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 A034958 #35 Feb 08 2019 02:33:53 %S A034958 5,23,101,311,931,1895,3875,6349,10643,18335,25873,39593,55607,71301, %T A034958 94559,127315,167495,204063,258283,315087,369749,451635,533015,640097, %U A034958 779283,902789,1013795,1159073,1295871,1457935,1786691,2002645,2272221 %N A034958 Divide primes into groups with prime(n) elements and add together. %H A034958 Hieronymus Fischer, <a href="/A034958/b034958.txt">Table of n, a(n) for n = 1..1000</a> %F A034958 From _Hieronymus Fischer_, Sep 26 2012: (Start) %F A034958 a(n) = Sum_{k=A007504(n-1)+1..A007504(n)} A000040(k), n > 1. %F A034958 a(n) = A007504(A007504(n)) - A007504(A007504(n-1)), n > 1. %F A034958 If we define A007504(0) := 0, then the formulas are also true for n = 1. %F A034958 (End) %e A034958 a(1) = 5 because the first 2 primes are 2 and 3 and 2 + 3 = 5. %e A034958 a(2) = 23 because the next 3 primes are 5, 7, 11, and they add up to 23. %e A034958 a(3) = 101 because the next 5 primes are 13, 17, 19, 23, 29 which add up to 101. %e A034958 a(4) = 311 because the next 7 primes are 31, 37, 41, 43, 47, 53, 59 and they add up to 311. %t A034958 Join[{5},Total[Prime[Range[#[[1]]+1,#[[2]]]]]&/@Partition[ Accumulate[ Prime[ Range[40]]],2,1]] (* _Harvey P. Dale_, Oct 03 2013 *) %t A034958 Module[{nn=33},Total/@TakeList[Prime[Range[Total[Prime[Range[nn]]]]], Prime[ Range[ nn]]]] (* Requires Mathematica version 11 or later *) (* _Harvey P. Dale_, Mar 16 2018 *) %t A034958 s = 0; Total[Table[s = s + 1; Prime[s], {j, 33}, {n, Prime[j]}], {2}] (* _Horst H. Manninger_, Jan 17 2019 *) %o A034958 (PARI) s(n) = sum(k=1, n, prime(k)); \\ A007504 %o A034958 a(n) = s(s(n)) - s(s(n-1)); \\ _Michel Marcus_, Oct 12 2018 %Y A034958 Cf. A006003, A027441, A034956. %Y A034958 Cf. A007504, A046992, A034959, A034960, A180302. %K A034958 nonn %O A034958 1,1 %A A034958 _Patrick De Geest_, Oct 15 1998