login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the least prime of the form 2*x+1 where x is the product of n consecutive primes.
2

%I #18 Jan 28 2022 12:07:12

%S 3,5,13,61,421,4621,3233231,333993639197596403,2156564411,

%T 5563815981553007,200560490131,401120980261,

%U 39637878826194618534431695203503,6120210247735371623457932152919,6803741602666897883879,12605609164720271524158527,417378486395280242796047685872617741911685961999

%N a(n) is the least prime of the form 2*x+1 where x is the product of n consecutive primes.

%H Robert Israel, <a href="/A347866/b347866.txt">Table of n, a(n) for n = 0..201</a>

%e 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.

%p f:= proc(n) local P,i,r;

%p P:= mul(ithprime(i),i=1..n);

%p for i from 1 do

%p r:= 2*P+1;

%p if isprime(r) then return r fi;

%p P:= P/ithprime(i)*ithprime(i+n);

%p od

%p end proc:

%p map(f, [$0..20]);

%t 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 *)

%Y Cf. A348430.

%K nonn

%O 0,1

%A _J. M. Bergot_ and _Robert Israel_, Jan 25 2022