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!)
A331810 Smallest integer x such that prime(n) divides 1 + x + x^2 + ... + x^(q-1) where q = A023503(n), or 0 if no such x exists. 0
2, 4, 2, 3, 3, 16, 7, 2, 7, 2, 10, 10, 4, 2, 10, 3, 9, 9, 20, 8, 8, 3, 2, 35, 36, 8, 3, 45, 16, 2, 39, 16, 6, 5, 8, 14, 58, 2, 6, 3, 42, 5, 84, 36, 18, 58, 2, 3, 16, 2, 6, 87, 20, 256, 2, 5, 10, 16, 59, 4, 16, 9, 7, 27, 10, 74, 8, 3, 31, 22, 2, 7, 12, 86, 2, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
Conjecture: every integer > 1 is in the sequence.
Theorem: Let p and q be prime numbers for which there exists an integer x such that p divides 1 + x + x^2 + ... + x^(q-1). Then p == 1 (mod q) or p = q.
LINKS
EXAMPLE
a(8) = 7 because prime(8) = 19 divides 1 + 7^1 + 7^2 = 57 = 3*19, where q = 3 = A023503(8).
a(9) = 2 because prime(9) = 23 divides 1 + 2^1 + 2^2 + 2^3 + 2^4 + 2^5 + 2^6 + 2^7 + 2^8 + 2^9 + 2^10 = 2047 = 23*89, where q = 11 = A023503(9).
MAPLE
with(numtheory):nn:=100:
for n from 2 to nn do:
p:=ithprime(n):d:=factorset(p-1):n0:=nops(d):q:=d[n0]:ii:=0:
for x from 1 to 10^5 while(ii=0) do:
s:=sum('x^(i-1)', 'i'=1..q):
if irem(s, p)=0 then
ii:=1:printf(`%d, `, x):
else fi:
od:
od:
MATHEMATICA
Array[Block[{k = 2}, While[Mod[Total[k^#2 ], #1] != 0, k++]; k ] & @@ {Prime@ #, Range[0, FactorInteger[Prime@ # - 1][[-1, 1]] - 1 ]} &, 76, 2] (* Michael De Vlieger, Jan 27 2020 *)
PROG
(PARI) a(n) = {my(p=prime(n), q=vecmax(factor(p-1)[, 1]), x=1); while (sum(k=0, q-1, x^k) % p, x++); x; } \\ Michel Marcus, Jan 30 2020
CROSSREFS
Cf. A023503 (greatest prime divisor of prime(n) - 1).
Sequence in context: A351785 A054240 A330312 * A182817 A082864 A134447
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jan 27 2020
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 July 31 04:10 EDT 2024. Contains 374774 sequences. (Running on oeis4.)