%I #9 Mar 18 2017 08:44:28
%S 0,2,5,10,28,160,1720,41022,1755214,133749406,16326765766,
%T 3043575378184,824056192305914,310985745617574548,
%U 158093565346546280550,105246070758368902737088,89604855320176022422345626,95625469041357230765320405676,125735670539766378990148368604358,200685953917230887657316431262249112
%N Sum of the primes to the n-th primeth recurrence: A007097(n).
%C Also employed Kim Walisch's primesum.
%F a(n) = A007504(A007097(n)).
%e a(0) = 0 since there are no primes up to 1 which is A007097(0);
%e a(1) = 2 since the first Primeth recurrence, A007097(1) is 2;
%e a(2) = 5 since the second Primeth recurrence, A007097(2) is 3, and 2+3 = 5;
%e a(3) = 10 since the third Primeth recurrence, A007097(3) is 5, and 2+3+5 = 10;
%e a(4) = 28 since the fourth Primeth recurrence, A007097(4) is 11, 2+3+5+7+11 = 28;
%e a(5) = 160 since the fifth Primeth recurrence, A007097(5) is 31, and 2+3+5+7+11+13+17+19+23+29+31 = 160; etc.
%t f[n_] := Block[{lmt = Nest[ Prime@# &, 1, n], p = 2, s = 0}, While[p <= lmt, s += p; p = NextPrime@ p]; s]; Array[f, 14, 0]
%Y Cf. A007097, A007504.
%K nonn
%O 0,2
%A _Robert G. Wilson v_, Mar 08 2017
|