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!)
A340468 a(n) is the least prime of the form 2 + Product_{i=n..m} prime(i). 1

%I #13 Jan 11 2021 10:51:03

%S 5,7,79,13,223,19,439,

%T 130753887906569681111538991218568790437537693430279000532630035672131604633987039552816424896353327834998483765849409837393409377729040653460715050958787058270805333463,

%U 31,34826927179023475480751694965449235272424989980919

%N a(n) is the least prime of the form 2 + Product_{i=n..m} prime(i).

%C If n is in A029707, a(n) = 2+prime(n).

%C If n is not in A029707 but prime(n) is in A051507, a(n) = 2+prime(n)*prime(n+1).

%C a(15) > 10^1000 if it exists.

%H Robert Israel, <a href="/A340468/b340468.txt">Table of n, a(n) for n = 2..14</a>

%e a(2) = 2+3 = 5.

%e a(3) = 2+5 = 7.

%e a(4) = 2+7*11 = 79.

%e a(5) = 2+11 = 13.

%e a(6) = 2+13*17 = 223.

%e a(7) = 2+17 = 19.

%e a(8) = 2+19*23 = 439.

%e a(9) = 2+23*29*...*431.

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

%p t:= 1;

%p for i from n do

%p t:= t*ithprime(i);

%p if isprime(t+2) then return t+2 fi;

%p od

%p end proc:

%p seq(f(n),n=2..14);

%o (Python)

%o from sympy import isprime, nextprime, prime

%o def a(n):

%o prodpnpm = pm = prime(n)

%o while not isprime(2+prodpnpm): pm = nextprime(pm); prodpnpm *= pm

%o return 2+prodpnpm

%o print([a(n) for n in range(2, 12)]) # _Michael S. Branicky_, Jan 08 2021

%Y Cf. A029707, A051507.

%K nonn

%O 2,1

%A _Robert Israel_, Jan 08 2021

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 April 19 08:45 EDT 2024. Contains 371782 sequences. (Running on oeis4.)