MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When trying to see if a number of the form $n^8-n^4+1$ can be divisible by the square of a prime, I found that it can indeed. The first few values for $n$ are

412, 786, 1417, 1818, 2430, 2640, 2809, 2822, 2899 ...

and the first few such primes $p$ (in increasing order) are

73, 97, 193, 241, 313, 337, 409, 433, ...

Interestingly enough, the latter is precisely the beginning of this sequence which lists the primes of the form $x^2+24y^2$. I am quite sure that this cannot be a pure coincidence and that some deep number theory must be involved. The number $24$ is not accidental either, as $n^8-n^4+1=\Phi_{24}(n)$, with $\Phi_k(x)$ being the $k$th cyclotomic polynomial. Maybe there is some relation to the field $\mathbb{Q}(\zeta_{24})$...

So, the question is if the following is true:

Conjecture. A prime $p$ has the form $x^2+24y^2$ if and only if $p^2$ divides $n^8-n^4+1$ for some $n$.

share|cite|improve this question
up vote 27 down vote accepted

Your conjecture is true in the light of the following statements.

Proposition 1. A prime $p$ has the form $x^2+24y^2$ if and only if $p\equiv 1\pmod{24}$.

Proposition 2. A prime square $p^2$ divides $\Phi_{24}(n)$ for some $n$ if and only if $p\equiv 1\pmod{24}$.

Proof of Proposition 1. The four equivalence classes of binary quadratic forms of discriminant $-96$ are represented by $x^2+24y^2$, $3x^2+8y^2$, $4x^2+4xy+7y^2$, $5x^2+2xy+5y^2$. Looking at the values in $(\mathbb{Z}/96\mathbb{Z})^\times$ assumed by these four quadratic forms, we see that they are in four different genera. This means that if $Q(x,y)$ is any of these forms and $p\geq 5$ is any prime, then $Q(x,y)$ represents $p$ if and only if it does so modulo $96$. In particular, $x^2+24y^2$ represents $p$ if and only if $p\equiv 1,25,49,73\pmod{96}$, i.e. when $p\equiv 1\pmod{24}$.

Proof of Proposition 2. By Hensel's Lemma, the square of a prime $p\geq 5$ divides $\Phi_{24}(n)$ for some $n$ if and only if $p$ divides $\Phi_{24}(m)$ for some $m$. The latter property holds if and only if $\mathbb{F}_p$ contains a primitive $24$-th root of unity, i.e. when $p\equiv 1\pmod{24}$.

References: Rose - A course in number theory; Cox - Primes of the form $x^2+ny^2$

share|cite|improve this answer

There is another proof which is somewhat easier.

Since the multiplicative group of $\mathbb{Z}/p\mathbb{Z}$ is cyclic there exists $x$ such that $\Phi_{24}(x) = 0 (mod p)$ iff $24 | p-1$. Notice that in this case $\Phi_{24}(x)$ has $8$ different roots in $\mathbb{Z}/p\mathbb{Z}$ and the derivative at each root is not divisible by $p$, which implies that any root if $\Phi_{24}$ in $\mathbb{Z}/p\mathbb{Z}$ can be lifted to a root in $\mathbb{Z}/p^k\mathbb{Z}$ (for all $k$) and even in $p$-adics $\mathbb{Z}_p$.

Here there is nothing special about $24$, and one can replace it with any integer.

share|cite|improve this answer
Your proof is almost identical to my proof for Proposition 2. Hensel's Lemma is the "lifting" you talk about, and $p\geq 5$ ensures that $\Phi_{24}$ does not have repeated roots modulo $p$ (as $2$ and $3$ are the only primes dividing the discriminant of $\Phi_{24}$). Still, one needs to explain why $24\mid p-1$ is equivalent to the existence of $x,y\in\mathbb{Z}$ such that $p=x^2+24y^2$. This is explained in my proof for Proposition 1. – GH from MO Dec 26 '11 at 21:27
I agree, I have not read completely your comment before posting mine. I suppose I should not have posted this as an answer... – kassabov Dec 26 '11 at 22:51
As long as people find it useful, it is OK :-) BTW you can always edit your answer or even delete it. Let me emphasize that $24$ is special for the quadratic forms part. For if a quadratic form is not alone in its genus (an example is $x^2+14y^2$), then congruence conditions do not suffice for determining which primes are represented. – GH from MO Dec 26 '11 at 23:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.