cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A371670 Largest prime number p such that x^n + y^n + z^n mod p does not take all values on Z/pZ.

This page as a plain text file.
%I A371670 #17 May 30 2024 22:13:52
%S A371670 5,11,31,43,41,37,61,89,229,79,127,61,257,137,397,419,521,337,463,277,
%T A371670 577,251,599,541,617,349,661,373,769,727,953,631,1117,593,761,1483,
%U A371670 761,739,1597,1033,1409,1171,1289,1693,2113,883,1301,1327,2861,1697,2269,1871,2633,1483,2089,2243,2221,1709,1861,2143
%N A371670 Largest prime number p such that x^n + y^n + z^n mod p does not take all values on Z/pZ.
%C A371670 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.
%C A371670 a(n) <= A355920(n). - _Jason Yuen_, May 30 2024
%H A371670 S. Lang and A. Weil, <a href="https://doi.org/10.2307/2372655">Number of Points of Varieties in Finite Fields</a>, Amer. J. Math., vol. 76, no. 4, 1954, pp. 819-27.
%H A371670 MathOverflow, <a href="https://mathoverflow.net/questions/356270">Does the expression x^4+y^4 take on all values in Z/pZ?</a>
%e A371670 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.
%e A371670 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.
%o A371670 (SageMath)
%o A371670 def a(n):
%o A371670     p = Integer(n^4).previous_prime()
%o A371670     while True:
%o A371670         nth_powers = set([power_mod(x, n, p) for x in range(p)])
%o A371670         for k in range(p):
%o A371670             for xn, yn in ((x,y) for x in nth_powers for y in nth_powers):
%o A371670                 if (k-xn-yn)%p in nth_powers: break
%o A371670             else: return p
%o A371670         p = p.previous_prime()
%o A371670 (Python)
%o A371670 from itertools import combinations_with_replacement
%o A371670 from sympy import prevprime
%o A371670 def A371670(n):
%o A371670     p = n**4
%o A371670     while (p:=prevprime(p)):
%o A371670         pset = set(q:=tuple(pow(x,n,p) for x in range(p)))
%o A371670         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)):
%o A371670             return p # _Chai Wah Wu_, Apr 04 2024
%Y A371670 Cf. A355920, A368055.
%K A371670 nonn
%O A371670 4,1
%A A371670 _Robin Visser_, Apr 02 2024
%E A371670 a(36)-a(63) from _Jason Yuen_, May 30 2024