login
A347866
a(n) is the least prime of the form 2*x+1 where x is the product of n consecutive primes.
2
3, 5, 13, 61, 421, 4621, 3233231, 333993639197596403, 2156564411, 5563815981553007, 200560490131, 401120980261, 39637878826194618534431695203503, 6120210247735371623457932152919, 6803741602666897883879, 12605609164720271524158527, 417378486395280242796047685872617741911685961999
OFFSET
0,1
LINKS
EXAMPLE
a(6) = 2*(5*7*11*13*17*19)+1 = 3233231 because that is prime while 2*(2*3*5*7*11*13)+1 = 60061 and 2*(3*5*7*11*13*17)+1 = 510511 are not prime.
MAPLE
f:= proc(n) local P, i, r;
P:= mul(ithprime(i), i=1..n);
for i from 1 do
r:= 2*P+1;
if isprime(r) then return r fi;
P:= P/ithprime(i)*ithprime(i+n);
od
end proc:
map(f, [$0..20]);
MATHEMATICA
a[n_] := Module[{x = Product[Prime[i], {i, 1, n}], p1 = 2, p2 = Prime[n + 1]}, While[! PrimeQ[2*x + 1], x *= (p2/p1); p1 = NextPrime[p1]; p2 = NextPrime[p2]]; 2*x + 1]; Array[a, 17, 0] (* Amiram Eldar, Jan 25 2022 *)
CROSSREFS
Cf. A348430.
Sequence in context: A243161 A153207 A144718 * A066141 A159293 A051901
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jan 25 2022
STATUS
approved