7
$\begingroup$

Let $p$ be prime. There is a whole host of "large" degree polynomials that can be computed efficiently modulo $p$. I was wondering if:

$$q(x) = \sum_{k=0}^{p-1} x^{k^2}$$

is a polynomial that can be evaluated efficiently modulo $p$.

A lot of polynomials like $1 + x + ... + x^l$ can be evaluated efficiently for even large $l$ by taking modular inverses, etc. If we have a rational generating function for the polynomial with a "few" terms it can be evaluated quickly.

So I was wondering if there are any nice expressions for $q(x)$ that make this easy to compute.

Somethings I looked at: https://en.wikipedia.org/wiki/Pentagonal_number_theorem https://mathworld.wolfram.com/JacobiTripleProduct.html

$\endgroup$
1
  • $\begingroup$ When $x$ is a rational root of unity whose denominator $p \equiv 2 \mod 4$ then this always 0. In general for any rational root of unity $x$ there is a simple formula based on Cesaro summation. In general because square numbers are sums of odd numbers you have the factorization $1+x(1+x^3(1+…$ which now just requires you to evaluate $x,x^3,x^5….$ this can be done efficiently via knowing $x$, and $x^2$ to generate the rest. Now can any of this become faster mod $p$? I’ll have to chew on that. $\endgroup$ Commented Nov 18, 2023 at 19:08

1 Answer 1

2
$\begingroup$

Not exactly an answer, but should provide a strong hint on where to look.

This is closely related to Gauss quadratic sums, expressions of the form $$ g(a;p) = \sum\limits_{k=0}^{p-1} \omega_p^{ak^2}, $$ where $\omega_p = e^{\frac{2\pi i}{p}}$ is the $p$-th primitive root of unity. Noteworthy, in complex numbers, $$ g(1;p) =\sum_{k=0}^{p-1}\omega_p^{k^2}= \begin{cases} (1+i)\sqrt{p} & \text{if}\ p\equiv 0 \pmod 4, \\ \sqrt{p} & \text{if}\ p\equiv 1\pmod 4, \\ 0 & \text{if}\ p \equiv 2 \pmod 4, \\ i\sqrt{p} & \text{if}\ p\equiv 3\pmod 4. \end{cases} $$

Now, getting back to $q(x)$, for any $x \neq 0$ it is kind of similar to $q(x)=1+\frac{p-1}{a}g(1;a)$, where $a = \operatorname{ord} x$. If my understanding is correct here, for any $a$ there would only be at most $4$ possible values of $q(x)$, depending on which square roots of $-1$ and $a$ within $GF(p)$ or $GF(p^2)$ they correspond to.

Unfortunately, I'm not exactly sure whether it translates to remainders modulo $p$ as easily as I hope it does, and if it does, how to understand which of the four possible values is actually $q(x)$ for any given $x$. I can only hope that a better understanding of Gauss quadratic sums would shed more light on this.

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.