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 A066527 #30 Oct 06 2023 14:14:09 %S A066527 10,28,133386,4218060,54047322253,14756071005948636, %T A066527 600605016143706003,41181981873797476176,240580227206205322973571, %U A066527 1350027226921161196478736 %N A066527 Triangular numbers that for some k are also the sum of the first k primes. %C A066527 a(n) = A000217(i) = A007504(j) for appropriate i, j. %C A066527 These are the 4, 7, 516, 2904, 328777, ... -th triangular numbers and are the sums of the first 3, 5, 217, 1065, 93448, ... prime numbers respectively. %C A066527 a(7) is the sum of the first 240439822 primes. a(8) is the sum of the first 1894541497 primes. - _Donovan Johnson_, Nov 24 2008 %C A066527 a(9) is the sum of the first 132563927578 primes. a(10) is the sum of the first 309101198255 primes. a(11) > 6640510710493148698166596 (sum of first pi(2*10^13) primes). - _Donovan Johnson_, Aug 23 2010 %e A066527 a(2) = 28, as A000217(7) = 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28 = 2 + 3 + 5 + 7 + 11 = A007504(5). %p A066527 a066527(m) = local(d,ds,p,ps); d=1; ds=1; p=2; ps=2; while(ds<m, if(ds==ps,print1(ds,","); d++; ds=ds+d; p++; p=nextprime(p); ps=ps+p, if(ds<ps,d++; ds=ds+d,p++; p=nextprime(p); ps=ps+p))) a066527(10^11) %t A066527 s = 0; Do[s = s + Prime[n]; t = Floor[ Sqrt[2*s]]; If[t*(t + 1) == 2s, Print[s]], {n, 1, 10^6} ] %t A066527 Select[Accumulate[Prime[Range[5000000]]],IntegerQ[(Sqrt[1+8#]-1)/2]&] (* _Harvey P. Dale_, May 04 2013 *) %o A066527 (Haskell) %o A066527 a066527 n = a066527_list !! (n-1) %o A066527 a066527_list = filter ((== 1) . a010054) a007504_list %o A066527 -- _Reinhard Zumkeller_, Mar 23 2013 %o A066527 (Python) %o A066527 from sympy import integer_nthroot, isprime, nextprime %o A066527 def istri(n): return integer_nthroot(8*n+1, 2)[1] %o A066527 def afind(limit): %o A066527 s, p = 2, 2 %o A066527 while s < limit: %o A066527 if istri(s): print(s, end=", ") %o A066527 p = nextprime(p) %o A066527 s += p %o A066527 afind(10**11) # _Michael S. Branicky_, Oct 28 2021 %Y A066527 Cf. A010054, A053790. %Y A066527 Intersection of A000217 and A007504. %Y A066527 Cf. also A061890, A364691, A366269. %K A066527 nonn,nice,more %O A066527 1,1 %A A066527 _Reinhard Zumkeller_, Jan 06 2002 %E A066527 a(5) from _Klaus Brockhaus_ and _Robert G. Wilson v_, Jan 07 2002 %E A066527 a(6) from Philip Sung (philip_sung(AT)hotmail.com), Jan 25 2002 %E A066527 a(7)-a(8) from _Donovan Johnson_, Nov 24 2008 %E A066527 a(9)-a(10) from _Donovan Johnson_, Aug 23 2010