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.

A024011 Numbers k such that the k-th prime divides the sum of the first k primes.

This page as a plain text file.
%I A024011 #49 Sep 27 2022 07:17:00
%S A024011 1,3,20,31464,22096548,1483892396791177
%N A024011 Numbers k such that the k-th prime divides the sum of the first k primes.
%C A024011 a(6) > pi(10^12) = 37607912018. - _Jon E. Schoenfield_, Sep 11 2008
%C A024011 a(6) > pi(10^14) = 3204941750802. - _Giovanni Resta_, Jan 09 2014
%C A024011 a(7) > 6.5*10^15. - _Paul W. Dyson_, Sep 27 2022
%e A024011 The third prime, 5, divides 2 + 3 + 5 = 10, so 3 is in the sequence.
%e A024011 2 + 3 + 5 + 7 = 17, which is not divisible by the fourth prime, 7, so 4 is not in the sequence.
%t A024011 s = 0; For[i = 1, i <= 5 * 10^7, i++, s = s + Prime[i]; If[Mod[s, Prime[i + 1]] == 0, Print[i + 1]]]
%t A024011 With[{prs = Prime[Range[221000000]]}, PrimePi /@ Transpose[Select[ Thread[ {Accumulate[prs], prs}], Divisible[#[[1]], #[[2]]] &]][[2]]] (* _Harvey P. Dale_, Jul 23 2013 *)
%t A024011 nMax = 50000; primeSums = Accumulate[Prime[Range[nMax]]]; Select[Range[nMax], Divisible[primeSums[[#]], Prime[#]] &] (* _Alonso del Arte_, Nov 11 2019 *)
%o A024011 (PARI) s=0; t=0; for(w=2,1000000000,if(isprime(w),s=s+w; t=t+1; if(s%w,print(t)),))
%Y A024011 Cf. A007506, A028581, A028582, A071089.
%K A024011 nonn,nice,hard,more
%O A024011 1,2
%A A024011 _G. L. Honaker, Jr._
%E A024011 a(5) from Kok Seng Chua (chuaks(AT)ihpc.nus.edu.sg), May 14 2000
%E A024011 a(6) from _Paul W. Dyson_, Apr 16 2022