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!)
A370111 Least prime p such that the sum of 2i - 1 consecutive primes starting with p is prime for each i <= n and not prime for i = n+1, and -1 if no such prime exists. 0
2, 17, 5, 19, 29, 4831, 1235791, 61483, 126064739, 32485822049 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(1) = 2: This is because the sum of 1 consecutive prime number starting with 2 (which is just 2 itself) is also a prime number. Additionally, the sum of 2 * 2 - 1 = 3 consecutive primes starting with 2 (i.e., 2 + 3 + 5 = 10 = 2 * 5) is not prime, and no smaller prime number satisfies this condition.
a(2) = 17: 17 is prime and the sum of 2*2 - 1 = 3 consecutive primes starting with 17 (i.e., 17 + 19 + 23 = 59) is a prime number. However, the sum of 2 * 3 - 1 = 5 consecutive primes starting with 17 (i.e., 17 + 19 + 23 + 29 + 31 = 119 = 7 * 17) is not prime, and no lesser prime number meets this requirement.
PROG
(PARI) card(p)=my(c=0, q=p, s=q); while(isprime(s), c++; for(i=1, 2, q=nextprime(q+2); s+=q)); c
a(n)=if(n==1, return(2)); forprime(p=3, +oo, my(x=card(p)); if(x==n, return(p)))
CROSSREFS
Cf. A370139.
Sequence in context: A186683 A210492 A355555 * A057280 A055677 A362397
KEYWORD
more,nonn
AUTHOR
Jean-Marc Rebert, Feb 12 2024
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 23 08:42 EDT 2024. Contains 375378 sequences. (Running on oeis4.)