What is the greatest integer that divides $p^4-1$ for every prime number $p$ greater than $5$?

I suppose this is more of a brute force method. By FlT, you know $p^4\equiv 1\pmod{5}$, so $5$ is a factor. Also, factoring, you get

$$p^4-1=(p-1)(p+1)(p^2+1),$$

and since $p$ is odd, each factor is divisible by $2$. Moreover, one of the factors $p-1$ or $p+1$ is divisible by $4$, so $4\cdot2\cdot 2=16$ is another factor. Finally, of the three consecutive integers, $p-1$, $p$, and $p+1$, $3$ is a factor of one. Since $p$ is prime and larger than $5$, $3\nmid p$, so $3|p^4-1$. Hence $16\cdot 3\cdot 5=240$ is a factor of $p^4-1$ for any prime $p\gt 5$.

It still remains to see that $240$ is the greatest such divisor. This can be confirmed by looking at $7^4-1=2400$ and $11^4-1=14640$.


$\rm\:p\nmid p^4-1\:$ so $\rm\:2,3,5\:$ are the only possible prime divisors. $240$ is the maximal product of such since $11^4-1 = 122\cdot 120 = 2^4\cdot3\cdot5\cdot 61\:.$ Now, as I mentioned on sci.math on Sep 1, 2003, for every n coprime to $\:2,3,5\:,\:$ hence certainly for every prime > $5$, we have that $\rm\:n^4 \equiv 1\ (mod\ 240)\:$ since $240$ has Carmichael lambda function $\rm\:\lambda(240) = \lambda(2^4\cdot3\cdot 5) = lcm(2^{4-2},\phi(3),\phi(5)) = 4\:.$

See also my my post on Carmichael's generalizations of little Fermat and Euler's phi function, and many applications of such in prior posts. It's well-worth learning these generalizations since they are ubiquitous in number theory.