The OEIS is supported by the many generous donors to the OEIS Foundation.

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A355920 Largest prime number p such that x^n + y^n mod p does not take all values on Z/pZ. 0
 7, 29, 61, 223, 127, 761, 307, 911, 617, 1741, 1171, 2927, 3181, 2593, 1667, 4519, 2927, 10781, 5167, 6491, 8419, 7177, 5501, 7307, 9829, 11117, 12703, 20011, 10789, 13249, 18217 (list; graph; refs; listen; history; text; internal format)
 OFFSET 3,1 COMMENTS As discussed in the link below, the Hasse-Weil bound assures that x^n + y^n == k (mod p) always has a solution when p - 1 - 2*g*sqrt(p) > n, where g = (n-1)*(n-2)/2 is the genus of the Fermat curve. For example, p > n^4 is large enough to satisfy this condition, so we only need to check finitely many p below n^4. LINKS MathOverflow, Does the expression x^4+y^4 take on all values in Z/pZ? Azuma Seiichi, Python code for calculating a(n) (Google Colab) EXAMPLE a(3) = 7 because x^3 + y^3 == 3 (mod 7) does not have a solution, but x^3 + y^3 == k (mod p) always has a solution when p is a prime greater than 7. PROG (Python) import sympy def a(n): g = (n - 1) * (n - 2) / 2 plist = list(sympy.primerange(2, n ** 4)) plist.reverse() for p in plist: # equivalent to p-1-2*g*p**0.5 > n: if (p - 1 - n) ** 2 > 4 * g * g * p: continue solution = [False] * p r = sympy.primitive_root(p) rn = r ** n % p # generator for subgroup {x^n} d = sympy.n_order(rn, p) # size of subgroup {x^n} nth_power_list = [] xn = 1 for k in range(d): xn = xn * rn % p nth_power_list.append(xn) for yn in nth_power_list: solution[(xn + yn) % p] = True for yn in nth_power_list: # consider the case x=0 solution[yn] = True solution[0] = True if False in solution: return p return -1 print([a(n) for n in range(3, 18)]) CROSSREFS Cf. A289559. Sequence in context: A031380 A005698 A080185 * A219835 A041621 A022272 Adjacent sequences: A355917 A355918 A355919 * A355921 A355922 A355923 KEYWORD nonn,more AUTHOR Azuma Seiichi, Jul 21 2022 EXTENSIONS a(13)-a(25) from Jinyuan Wang, Jul 22 2022 a(26)-a(27) from Chai Wah Wu, Sep 13 2022 a(28)-a(33) from Chai Wah Wu, Sep 14 2022 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 7 05:41 EST 2022. Contains 358649 sequences. (Running on oeis4.)