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.
%I A367689 #22 Nov 28 2023 11:00:40 %S A367689 7,5,11,7,29,5,7,11,23,5,53,29,7,5,103,7,191,5,7,23,47,5,11,53,7,5,59, %T A367689 7,311,5,7,103,11,5,149,191,7,5,83,7,173,5,7,47,283,5,29,11,7,5,107,7, %U A367689 11,5,7,59,709,5,367,311,7,5,11,7,269,5,7,11,569,5,293,149,7,5,23,7,317,5 %N A367689 Smallest prime number p such that x^n + y^n mod p does not take all values on Z/pZ. %C A367689 If there exists some prime p > 3 such that p-1 divides n, then x^n (mod p) is either 0 or 1 for all integers x, therefore giving an upper bound of a(n) <= p. %H A367689 Robin Visser, <a href="/A367689/b367689.txt">Table of n, a(n) for n = 3..5000</a> %e A367689 For n = 3, x^3 + y^3 attains all values on Z/2Z, Z/3Z, and Z/5Z, but x^3 + y^3 == 3 (mod 7) has no solution, so a(3) = 7. %e A367689 For n = 4, x^4 + y^4 attains all values on Z/2Z and Z/3Z, but x^4 + y^4 == 3 (mod 5) has no solution, so a(4) = 5. %o A367689 (Sage) %o A367689 def a(n): %o A367689 for p in Primes(): %o A367689 all_values = set() %o A367689 for x in range(p): %o A367689 for y in range(p): %o A367689 all_values.add((x^n+y^n)%p) %o A367689 if len(all_values) < p: return p %o A367689 (PARI) a(n) = my(p=2); while (#setbinop((x,y)->Mod(x,p)^n+Mod(y,p)^n, [0..p-1]) == p, p=nextprime(p+1)); p; \\ _Michel Marcus_, Nov 27 2023 %o A367689 (Python) %o A367689 from itertools import combinations_with_replacement %o A367689 from sympy import sieve %o A367689 def A367689(n): %o A367689 for p in sieve.primerange(n**4+1): %o A367689 s = set() %o A367689 for k in combinations_with_replacement({pow(x,n,p) for x in range(p)},2): %o A367689 s.add(sum(k)%p) %o A367689 if len(s) == p: %o A367689 break %o A367689 else: %o A367689 return p # _Chai Wah Wu_, Nov 27 2023 %Y A367689 Cf. A355920, A367688. %K A367689 nonn %O A367689 3,1 %A A367689 _Robin Visser_, Nov 26 2023