OFFSET
4,1
COMMENTS
a(n) is well-defined for all n >= 4, following a similar discussion given in A355920. Indeed for any integer k, by fibering the surface C : x^n + y^n + z^n == k (mod p) into curves and applying the Hasse-Weil bound, we obtain that the number of points N on C must satisfy |N - p(p+1)| <= 2*g*p*sqrt(p), where g = (n-1)(n-2)/2 is the genus of the Fermat curve x^n + y^n = 1. Thus, N is nonzero if p+1 > (n-1)(n-2)*sqrt(p). In particular, x^n + y^n + z^n mod p takes all values on Z/pZ for all primes p > n^4.
a(n) <= A355920(n). - Jason Yuen, May 30 2024
LINKS
S. Lang and A. Weil, Number of Points of Varieties in Finite Fields, Amer. J. Math., vol. 76, no. 4, 1954, pp. 819-27.
MathOverflow, Does the expression x^4+y^4 take on all values in Z/pZ?
EXAMPLE
For n = 4, the equation x^4 + y^4 + z^4 == 4 (mod 5) does not have a solution, but x^4 + y^4 + z^4 == k (mod p) does have a solution for any integer k and prime p greater than 5, thus a(4) = 5.
For n = 5, the equation x^5 + y^5 + z^5 == 4 (mod 11) does not have a solution, but x^5 + y^5 + z^5 == k (mod p) does have a solution for any integer k and prime p greater than 11, thus a(5) = 11.
PROG
(SageMath)
def a(n):
p = Integer(n^4).previous_prime()
while True:
nth_powers = set([power_mod(x, n, p) for x in range(p)])
for k in range(p):
for xn, yn in ((x, y) for x in nth_powers for y in nth_powers):
if (k-xn-yn)%p in nth_powers: break
else: return p
p = p.previous_prime()
(Python)
from itertools import combinations_with_replacement
from sympy import prevprime
def A371670(n):
p = n**4
while (p:=prevprime(p)):
pset = set(q:=tuple(pow(x, n, p) for x in range(p)))
if not all(any((k-a[0]-a[1])%p in pset for a in combinations_with_replacement(q, 2)) for k in range(p)):
return p # Chai Wah Wu, Apr 04 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Robin Visser, Apr 02 2024
EXTENSIONS
a(36)-a(63) from Jason Yuen, May 30 2024
STATUS
approved