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!)
A082277 Smallest prime that is the sum of prime(n) consecutive primes. 0
5, 23, 53, 197, 233, 691, 499, 857, 1151, 2099, 2399, 2909, 3821, 4217, 5107, 6079, 10091, 8273, 12281, 11597, 12713, 15527, 22741, 26041, 25759, 37447, 28087, 36607, 36067, 35527, 42463, 46181, 49279, 65033, 67271, 71011, 71167, 76099, 78139, 96001, 95107 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
Sum of reciprocals converges to 0.28053...
a(n) = A070281(prime(n)). - Michel Marcus, Aug 07 2021
EXAMPLE
For prime(2) = 3,
2+3+5 = 10,
3+5+7 = 15,
5+7+11 = 23,
7+11+13 = 31.
So a(2) = 23, the first prime that is the sum of 3 consecutive primes.
PROG
(PARI)
\\ First prime in the sum of a prime number of consecutive primes
upto(n) = { sr=.2; print1(5", "); forprime(i=2, n, s=0; for(j=1, i, s+=prime(j); ); for(x=1, n, s = s - prime(x)+ prime(x+i); if(isprime(s), sr+=1.0/s; print1(s", "); break); ); ); /* print(); print(sr)*/}
(Python)
from sympy import isprime, nextprime, prime, primerange
def a(n):
pn = prime(prime(n))
smallest = list(primerange(2, pn+1))
while not isprime(sum(smallest)):
pn = nextprime(pn)
smallest = smallest[1:] + [pn]
return sum(smallest)
print([a(n) for n in range(1, 42)]) # Michael S. Branicky, May 23 2021
CROSSREFS
Cf. A070281.
Sequence in context: A241099 A338977 A090686 * A289154 A155851 A019267
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, May 09 2003
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 July 24 22:37 EDT 2024. Contains 374585 sequences. (Running on oeis4.)