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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A367689 Smallest prime number p such that x^n + y^n mod p does not take all values on Z/pZ. 3
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,1
COMMENTS
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.
LINKS
EXAMPLE
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.
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.
PROG
(Sage)
def a(n):
for p in Primes():
all_values = set()
for x in range(p):
for y in range(p):
all_values.add((x^n+y^n)%p)
if len(all_values) < p: return p
(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
(Python)
from itertools import combinations_with_replacement
from sympy import sieve
def A367689(n):
for p in sieve.primerange(n**4+1):
s = set()
for k in combinations_with_replacement({pow(x, n, p) for x in range(p)}, 2):
s.add(sum(k)%p)
if len(s) == p:
break
else:
return p # Chai Wah Wu, Nov 27 2023
CROSSREFS
Sequence in context: A304136 A305042 A247870 * A141391 A135766 A067745
KEYWORD
nonn
AUTHOR
Robin Visser, Nov 26 2023
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 1 20:04 EDT 2024. Contains 372176 sequences. (Running on oeis4.)