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!)
A368055 Smallest prime number p such that x^n + y^n + z^n mod p does not take all values on Z/pZ. 2
5, 11, 7, 29, 5, 19, 11, 23, 5, 53, 29, 11, 5, 103, 7, 191, 5, 29, 23, 47, 5, 11, 53, 19, 5, 59, 7, 311, 5, 23, 103, 11, 5, 149, 191, 53, 5, 83, 7, 173, 5, 11, 47, 283, 5, 29, 11, 103, 5, 107, 7, 11, 5, 191, 59, 709, 5, 367, 311, 19, 5, 11, 7, 269, 5, 47, 11, 569, 5, 293, 149, 11 (list; graph; refs; listen; history; text; internal format)
OFFSET
4,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
Chai Wah Wu, Table of n, a(n) for n = 4..5226 (terms 4..500 from Robert Israel)
FORMULA
a(n+k*(a(n)-1)) <= a(n). - Robert Israel, Jan 26 2024
EXAMPLE
For n = 4, x^4 + y^4 + z^4 attains all values on Z/2Z and Z/3Z, but x^4 + y^4 + z^4 == 4 (mod 5) has no solution, so a(4) = 5.
For n = 5, x^5 + y^5 + z^5 attains all values on Z/2Z, Z/3Z, Z/5Z, and Z/7Z, but x^5 + y^5 + z^5 == 4 (mod 11) has no solution, so a(5) = 11.
MAPLE
f:= proc(n) local p, s, t, T, S, S2, S3;
p:= 2;
do
p:= nextprime(p);
T:= {$0..p-1}:
S:= {seq(s^n mod p, s=0..p-1)};
if S = T then next fi;
S2:= {seq(seq(s+t mod p, s=S), t=S)};
if S2 = T then next fi;
S3:= {seq(seq(s+t mod p, s=S), t=S2)}:
if S3 <> T then return p fi
od
end proc:
map(f, [$4..100]); # Robert Israel, Jan 26 2024
PROG
(SageMath)
def a(n):
for p in Primes():
all_values = set()
for x in range(p):
for y in range(p):
for z in range(p): all_values.add((x^n+y^n+z^n)%p)
if len(all_values) < p: return p
(Python)
from itertools import combinations_with_replacement
from sympy import nextprime
def A368055(n):
p = 1
while (p:=nextprime(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
Cf. A367689.
Sequence in context: A367705 A068419 A226586 * A358613 A329005 A290195
KEYWORD
nonn
AUTHOR
Robin Visser, Dec 09 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 6 18:59 EDT 2024. Contains 372297 sequences. (Running on oeis4.)