The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A351921 a(n) is the smallest nonzero number k such that gcd(prime(1)^k + 1, prime(2)^k + 1, ..., prime(n)^k + 1) > 1 and gcd(prime(1)^k + 1, prime(2)^k + 1, ..., prime(n+1)^k + 1) = 1. 0
2, 26, 21, 86, 33, 1238, 4401, 4586, 16161, 18561, 81, 37046, 85478, 180146, 339866 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
Apparently, a(n) = (A307965(n+1) + 1)/2 - 1 for n>=3. - Hugo Pfoertner, Mar 02 2022
LINKS
MATHEMATICA
a[n_] := Module[{k = 1, p = Prime[Range[n + 1]]}, While[GCD @@ (Most[p]^k + 1) == 1 || GCD @@ (p^k + 1) > 1, k++]; k]; Array[a, 10, 2] (* Amiram Eldar, Feb 26 2022 *)
PROG
(Python)
from sympy import sieve
from math import gcd
from functools import reduce
sieve.extend_to_no(50)
pr = list(sieve._list)
terms = [0]*100
for i in range(2, 85478+1):
k, g, len_f = 1, 2, 0
while g != 1:
k += 1
len_f += 1
g = reduce(gcd, [t**i + 1 for t in pr[:k]])
if len_f > 1 and terms[len_f] == 0:
terms[len_f] = i
print(terms[2:15])
(PARI) isok(k, n) = my(v = vector(n+1, i, prime(i)^k+1)); (gcd(v) == 1) && (gcd(Vec(v, n)) != 1);
a(n) = my(k=1); while (!isok(k, n), k++); k; \\ Michel Marcus, Mar 18 2022
CROSSREFS
Sequence in context: A035420 A241202 A278479 * A022375 A072663 A276176
KEYWORD
nonn,more
AUTHOR
Gleb Ivanov, Feb 25 2022
EXTENSIONS
a(15)-a(16) from Jon E. Schoenfield, Mar 01 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 6 23:24 EDT 2024. Contains 373135 sequences. (Running on oeis4.)