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!)
A359396 a(n) is the least k such that k^j+2 is prime for j = 1 to n but not n+1. 0
5, 9, 105, 3, 909, 4995825, 28212939 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
All terms are odd, and all except a(1) = 5 are divisible by 3.
The generalized Bunyakovsky conjecture implies that a(n) exists for all n.
a(8) > 10^10.
a(8) > 10^11. - Lucas A. Brown, Jan 11 2023
LINKS
EXAMPLE
a(4) = 3 because 3^1 + 2 = 5, 3^2 + 2 = 11, and 3^3 + 2 = 29 and 3^4 + 2 = 83 are prime but 3^5 + 2 = 245 is not.
MAPLE
f:= proc(n) local j;
for j from 1 do
if not isprime(n^j+2) then return j-1 fi
od
end proc:
V:= Vector(7): V[1]:= 5: count:= 1:
for k from 3 by 6 while count < 7 do
v:= f(k);
if v > 0 and V[v] = 0 then V[v]:= k; count:= count+1 fi
od:
convert(V, list);
PROG
(Python)
from sympy import isprime
from itertools import count, islice
def f(k):
j = 1
while isprime(k**j + 2): j += 1
return j-1
def agen():
adict, n = dict(), 1
for k in count(2):
v = f(k)
if v not in adict: adict[v] = k
while n in adict: yield adict[n]; n += 1
print(list(islice(agen(), 5))) # Michael S. Branicky, Jan 09 2023
CROSSREFS
Cf. A087576.
Sequence in context: A279707 A329002 A280642 * A222583 A222374 A097397
KEYWORD
nonn,more
AUTHOR
Robert Israel, Dec 29 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 August 24 19:29 EDT 2024. Contains 375417 sequences. (Running on oeis4.)