This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A082277 #20 Aug 11 2021 11:00:54 %S A082277 5,23,53,197,233,691,499,857,1151,2099,2399,2909,3821,4217,5107,6079, %T A082277 10091,8273,12281,11597,12713,15527,22741,26041,25759,37447,28087, %U A082277 36607,36067,35527,42463,46181,49279,65033,67271,71011,71167,76099,78139,96001,95107 %N A082277 Smallest prime that is the sum of prime(n) consecutive primes. %F A082277 Sum of reciprocals converges to 0.28053... %F A082277 a(n) = A070281(prime(n)). - _Michel Marcus_, Aug 07 2021 %e A082277 For prime(2) = 3, %e A082277 2+3+5 = 10, %e A082277 3+5+7 = 15, %e A082277 5+7+11 = 23, %e A082277 7+11+13 = 31. %e A082277 So a(2) = 23, the first prime that is the sum of 3 consecutive primes. %o A082277 (PARI) %o A082277 \\ First prime in the sum of a prime number of consecutive primes %o A082277 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)*/} %o A082277 (Python) %o A082277 from sympy import isprime, nextprime, prime, primerange %o A082277 def a(n): %o A082277 pn = prime(prime(n)) %o A082277 smallest = list(primerange(2, pn+1)) %o A082277 while not isprime(sum(smallest)): %o A082277 pn = nextprime(pn) %o A082277 smallest = smallest[1:] + [pn] %o A082277 return sum(smallest) %o A082277 print([a(n) for n in range(1, 42)]) # _Michael S. Branicky_, May 23 2021 %Y A082277 Cf. A070281. %K A082277 easy,nonn %O A082277 1,1 %A A082277 _Cino Hilliard_, May 09 2003