login
A348430
a(n) is the least prime of the form x+2 where x is the product of n consecutive primes.
2
3, 5, 17, 107, 215443, 15017, 1616617, 19657257924643, 8618654420263, 3234846617, 100280245067, 3710369067407, 19818939413097309267215847601753, 102481630431415237, 307444891294245707, 320460058359035439847, 961380175077106319537
OFFSET
0,1
LINKS
EXAMPLE
a(4) = 17*19*23*29+2 because that is prime while 2*3*5*7+2, 3*5*7*11+2, ..., 13*17*19*23+2 are not.
MAPLE
f:= proc(n) local P, i, r;
P:= mul(ithprime(i), i=2..n+1);
for i from 2 do
r:= P+2;
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, 2, n + 1}], p1 = 3, p2 = Prime[n + 2]}, While[! PrimeQ[x + 2], x *= (p2/p1); p1 = NextPrime[p1]; p2 = NextPrime[p2]]; x + 2]; Array[a, 17, 0] (* Amiram Eldar, Jan 25 2022 *)
CROSSREFS
Sequence in context: A084723 A288376 A096178 * A107312 A083213 A171271
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jan 25 2022
STATUS
approved