cp's OEIS Frontend

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.

A013918 Primes equal to the sum of the first k primes for some k.

This page as a plain text file.
%I A013918 #51 Dec 24 2024 22:12:13
%S A013918 2,5,17,41,197,281,7699,8893,22039,24133,25237,28697,32353,37561,
%T A013918 38921,43201,44683,55837,61027,66463,70241,86453,102001,109147,116533,
%U A013918 119069,121631,129419,132059,263171,287137,325019,329401,333821,338279,342761
%N A013918 Primes equal to the sum of the first k primes for some k.
%C A013918 Intersection of A000040 and A007504. - _David W. Wilson_, May 11 2007
%C A013918 Sum of the first k primes p_1+p_2+...+p_k is in the sequence if and only if there exists the prime q for which p_i divides p_1+p_2+...+p_k+q for all i to k. - _Vladimir Letsko_, Oct 13 2013
%H A013918 T. D. Noe, <a href="/A013918/b013918.txt">Table of n, a(n) for n = 1..10000</a>
%H A013918 Vladimir Letsko, <a href="http://dxdy.ru/post354640.html#p354640">Mathematical Marathon, problem 124</a> (in Russian).
%H A013918 Romeo Meštrović, <a href="https://arxiv.org/abs/1804.04198">Curious conjectures on the distribution of primes among the sums of the first 2n primes</a>, arXiv:1804.04198 [math.NT], 2018.
%F A013918 a(n) = A007504(A013916(n)).
%t A013918 Select[Accumulate[Prime[Range[1000]]], PrimeQ] (* _Vladimir Joseph Stephan Orlovsky_, Sep 01 2008 *)
%o A013918 (PARI) n=0;forprime(k=2,2300,n=n+k;if(isprime(n),print(n))) \\ _Michael B. Porter_, Jan 29 2010
%o A013918 (Haskell)
%o A013918 a013918 n = a013918_list !! (n-1)
%o A013918 a013918_list = filter ((== 1) . a010051) a007504_list
%o A013918 -- _Reinhard Zumkeller_, Feb 09 2015
%o A013918 (Python)
%o A013918 from sympy import isprime, nextprime; m = p = 0
%o A013918 while p < 2280:
%o A013918     p = nextprime(p); m += p
%o A013918     if isprime(m): print(m, end = ', ') # _Ya-Ping Lu_, Dec 24 2024
%Y A013918 Cf. A013916, A013917, A189153 (number of these primes < 10^n).
%Y A013918 Cf. A007504, A010051, A000040.
%K A013918 nonn
%O A013918 1,1
%A A013918 _N. J. A. Sloane_, Renaud Lifchitz (100637.64(AT)CompuServe.COM)
%E A013918 More terms from _David W. Wilson_