Let a prime number $p$, and $n$ a positive integer such $$p\mid n^4+n^3+2n^2-4n+3.$$ Show that $$p^4\equiv p\pmod {13}.$$
A friend of mine suggested that I might be able to use the results problem.
Let a prime number $p$, and $n$ a positive integer such $$p\mid n^4+n^3+2n^2-4n+3.$$ Show that $$p^4\equiv p\pmod {13}.$$
A friend of mine suggested that I might be able to use the results problem.
I highly respect subtle mathematics but here, at MSE, I give priority to the elementary. I think mainly of beginners who, for obvious reasons, do not understand anything if the reasoning is of medium high level.
We have to prove that the polynomial $f(x)=x^4+x^3+2x^2-4x+3$ (which, say it, is always divisible by the prime $3$ because $f(n)=n(n-1)(n+1)^2+3(n^2-n+1)$) is such that putting $$f(n)=\prod_{i=1}^{i=r}p_i^{\alpha_i}$$ where $n$ is an arbitrary natural, it is verified for all $p_i$ the congruence $$p_i^4\equiv p_i\pmod{13}$$ so it is clear that the primes $p_i$ belong to a certain class excluding a lot of other primes.
We can write $$4f(n)=(2n^2+n+5)^2-13(n+1)^2$$ from which $$4f(n)\equiv(2n^2+n+5)^2\pmod{13}$$ A straightforward calculation gives for $g(x)=(2x^2+x+5)^2$ $$g(\mathbb F_{13})=\{0,4,10,12\}$$ so we have (adding details) in $\mathbb F_{13}$ (where $0=13k;1=13k+1$, etc) $$\begin{cases}4f(n)=0 \hspace{10mm}\text {for } n=0\space \text {and 3}\\4f(n)=4\hspace{10mm}\text {for } n=2,4,8,11\\4f(n)=10\hspace{8mm}\text {for } n=7,9,10,12\\4f(n)=12\hspace{8mm}\text {for } n=1,5,6\end{cases}$$ On the other hand the inverse of $4$ modulo $13$ is $10$ so we have
$$\begin{cases}f(n)= 0\hspace{10mm}\text {for } n=0\space \text {and 3} \\f(n)=1\hspace{10mm}\text {for } n=2,4,8,11\\f(n)=9\hspace{10mm}\text {for } n=7,9,10,12\\f(n)=3\hspace{10mm}\text {for } n=1,5,6\end{cases}$$ Now the primes $p_i$ above can be only $13$ and those of the form $13k+1,13k+9$ and $13k+3$.
This property can be easily verified because if $p^4\equiv p\pmod{13}\iff p(p^3-1)=13$k then $p^3-1$ is divisible by $13$ when $p\ne13$. In fact $$1^3-1=0=13\cdot0\\\hspace{5mm}9^3-1=728=13\cdot56\\3^3-1=26=13\cdot2$$ But none of the nine integers below are divisible by $13$ $$2^3-1\\4^3-1\\5^3-1\\6^3-1\\7^3-1\\8^3-1\\10^3-1\\11^3-1\\12^3-1$$
The key idea here is that the polynomial $ P(X) = X^4 + X^3 + 2X^2 - 4X + 3 $ is not arbitrarily chosen. If $ \alpha $ denotes a root of this polynomial over $ \mathbf Q $, then $ \mathbf Q(\alpha) $ is the unique quartic subfield of $ \mathbf Q(\zeta_{13}) $ - in fact, we have
$$ \alpha = \zeta_{13} + \zeta_{13}^{3} + \zeta_{13}^{9} $$
(where $ 1, 3, 9 $ are the fourth powers mod $ 13 $, of course.) If the polynomial $ P $ has a root mod $ p $, then the prime $ p $ splits completely in the quartic subfield, and that's equivalent to the subfield being fixed by the Frobenius element corresponding to the prime $ p $, which is the automorphism given by extending $ \zeta_{13} \to \zeta_{13}^p $. It's easy to see this automorphism fixes the subfield if and only if $ p $ is a fourth power mod $ 13 $, which is a condition equivalent to $ p^4 \equiv p \pmod{13} $. The proof is completely analogous to the one of quadratic reciprocity. (This argument ignores the case when $ p = 13 $, which is the only ramified prime in $ \mathbf Q(\zeta_{13}) $, but in this case the claim $ p^4 \equiv p \pmod{13} $ is trivially satisfied.)
A more down-to-earth version of the same argument can be given by considering the Frobenius automorphism over $ \mathbf F_p $, in which case not quite as much algebraic number theory needs to be brought to bear on the question, but the spirit of the argument remains the same.
Assume that $\ne3,13$. Let $\zeta\ne1$ be a $13$th root of unity in $F_p$ and let $$ a=\zeta+\zeta^3+\zeta^9, \quad b=\zeta^2+\zeta^6+\zeta^{12}, \quad c=\zeta^4+\zeta^{12}+\zeta^{24}, \quad\text{and}\quad d=\zeta^8+\zeta^{16}+\zeta^{48}; $$ it can be verified that $$ (x-a)(x-b)(x-c)(x-d) = x^4+x^3+2x^2-4x+3. \tag{$*$} $$ (This is how the polynomial $(*)$ was constructed.)
By the condition, $n$ is a root of $(*)$; w.l.o.g $a=n\in F_p$.
Notice that $c=\frac{3-2a-a^3}{3}\in F_p$, and $$ (x-\zeta)(x-\zeta^3)(x-\zeta^9) = x^3-ax^2+cx-1. \tag{**} $$ This polynomial is either irreducible over $F_p$ or all its roots are in $F_p$; in both cases $\zeta\in F_{p^3}$. Then $ord(\zeta)=13$ divides $|F_{p^3}^*|=p^3-1$.
Using pari/gp.
? f(n)=n^4+n^3+2*n^2-4*n+3;
?
? for(r=0,12,print1(f(Mod(r,13))", "))
Mod(3, 13), Mod(3, 13), Mod(1, 13), Mod(0, 13), Mod(1, 13), Mod(3, 13), Mod(3, 13), Mod(9, 13), Mod(1, 13), Mod(9, 13), Mod(9, 13), Mod(1, 13), Mod(9, 13),
I.e. $f(n)\equiv 0,1,3,9 \pmod{13}$.
Solve $p^4\equiv p \pmod{13}$:
? polrootsmod('p^4-'p,13)
%1 = [Mod(0, 13), Mod(1, 13), Mod(3, 13), Mod(9, 13)]~
Any powering and product primes of form $0,1,3,9 \pmod{13}$ is again $0,1,3,9 \pmod{13}$.
Thus $p\mid f(n) \iff p^4\equiv p\pmod {13}$.
Proof for the case when $n\bmod 13 \neq 3$
Let $n\bmod 13 = k$. Then, by substituting $k=0,1,\ldots,12$ and $k\neq 3$, we have $$\left[n^4+n^3+2n^2-4n+3\right]\bmod 13= \left[k^4+k^3+2k^2-4k+3\right]\bmod 13\in\{1,3,9\},$$ which are all powers of $3$. Now, notice that $$n^4+n^3+2n^2-4n+3\bmod p=0\implies p\bmod 13 \in\{ 1,3, 9\},\tag{1}$$ since $p\bmod 13\neq 0$ as $p$ is a prime number. Finally, we deduce that \begin{align} p^4\bmod 13&=\left[p^4-p + p\right]\bmod 13\\ &=\left[p(p-1)(p^2+p+1)+ p\right]\bmod 13\\ &=\left[p(p-1)(p^2+p-12) + p\right]\bmod 13\\ &= \left[p(p-1)(p-3)(p+4)+ p\right]\bmod 13\\ &=\left[p(p-1)(p-3)(p-9)+ p\right]\bmod 13 \\ &= p\bmod 13. \end{align} where we use $(1)$.
My take on this problem is to solve the quartic equation using the quartic formula. To use this formula, the $x^3$ term needs to be eliminated, which can be done by substituting $y=x-\frac {1}{4}$. The result is, after quite a bit of algebra, is
$y^4+\frac{13}{8} y^2 - \frac{39}{8}y -\frac{1053}{256}=0$
To solve this, use the cubic resolvent. For $y^4+py^2+qy+r$ this is
$z^3+2pz^2+(p^2-4r)z-q^2=0$
This yields
$z^3+\frac{13}{4}z^2-\frac{221}{16}z-\frac{1521}{64}=0$
Solve this using the cubic formula, which involves eliminating the $z^2$ term with $w=z-\frac{13}{16}$. After a lot more algebra, one finds that the roots are $\frac{13}{4}$, $\frac{-13+2\sqrt(13)}{4}$, and $\frac{-13-2\sqrt(13)}{4}$. That means that a root of the reduced quartic is
$\frac{1}{2} (\sqrt(\frac{13}{4})+\sqrt(\frac{-13+2\sqrt(13)}{4}) + \sqrt(\frac{-13-2\sqrt(13)}{4})$
Going back to the original quartic, one get, as one of the roots
$-\frac{1}{4}+\frac{1}{2} (\sqrt(\frac{13}{4})+\sqrt(\frac{-13+2\sqrt(13)}{4}) + \sqrt(\frac{-13-2\sqrt(13)}{4})$
Now if we take this polynomial mod 13, all the square root stuff beyond the $-\frac{1}{4}$ is zero, so a root mod 13 is $-\frac{1}{4}$. By trial and error or solving a diophantine equation, one gets that $-\frac{1}{4}=3$ mod 13. Then note that $3^4 = 3$ mod 13, which gives the intended result.