Project Euler Problem 753
Fermat's Last Theorem states that no three positive integers a, b, c satisfy the equation for any integer value of n gre
Solution
Answer: 4714126766770661630
Using the cubic-residue structure of $\mathbb{F}_p$ and the CM theory of the elliptic curve
$$x^3+y^3=1,$$
one can derive:
- If $p \equiv 2 \pmod 3$, the cube map is a bijection, so
$$F(p)=(p-1)(p-2).$$
- If $p \equiv 1 \pmod 3$, write
$$4p=A^2+27B^2$$
with $A\equiv 1\pmod 3$. Then
$$F(p)=(p-1)(p-8+A).$$
- Special case:
$$F(3)=2.$$
This matches the examples:
- $F(5)=12$,
- $F(7)=0$.
Summing over all primes $p<6{,}000{,}000$ gives:
Answer: 4714126766770661630