login
Sum of first a(n) consecutive primes gives a triangular number.
4

%I #26 Oct 06 2023 12:53:49

%S 3,5,217,1065,93448,39545957,240439822,1894541497,132563927578,

%T 309101198255

%N Sum of first a(n) consecutive primes gives a triangular number.

%C A007504(a(n)) = A000217(j) for some j.

%C Numbers k such that Sum_{i=1..k} prime(i) = j*(j+1)/2, where prime(i) is i-th prime, and j an integer.

%e k=3 is a term: 2+3+5=10, and 10=4*5/2 is a triangular number, j=4.

%e k=5 is a term: 2+3+5+7+11=28, and 28=7*8/2 is a triangular number, j=7.

%e k=217 is a term: 2+3+...+1327=133386, and 133386=516*517/2 is a triangular number, j=516.

%o (PARI) isok(n) = ispolygonal(sum(k=1, n, prime(k)), 3); \\ _Michel Marcus_, Oct 13 2018

%Y Cf. A000040, A000217, A007504, A066527.

%Y Cf. also A033997, A364696, A366270.

%K nonn,more

%O 1,1

%A _Ctibor O. Zizka_, Feb 20 2010

%E a(6)-a(10) from _Nathaniel Johnston_, May 10 2011 (a(7)-a(10) based on comments by _Donovan Johnson_)

%E Name, comment and example clarified by _Ilya Gutkovskiy_, Aug 07 2023