%I #11 Apr 04 2016 00:29:44
%S 0,1,1,5,1,14,1,4,14,17,1,42,9,27,23,42,44,47,37,70,0,60,76,66,59,46,
%T 109,68,132,124,146,49,181,78,163,129,173,130,118,101,153,164,190,154,
%U 174,135,213,211,288,241,161,273,186,153,252
%N a(1) = 0; a(n) is the sum of m < n for which a(m) + n is prime.
%H Peter Kagey, <a href="/A270654/b270654.txt">Table of n, a(n) for n = 1..10000</a>
%e a(1) = 0;
%e a(2) = 1 because 2 + a(1) is prime
%e a(3) = 1 because 3 + a(1) is prime
%e a(4) = 5 because 4 + a(2) = 4 + a(3) is prime; 2 + 3 = 5
%o (PARI) lista(nn) = {va = vector(nn); print1(va[1], ", "); for (n=2, nn, va[n] = sum(k=1, n-1, k*(isprime(n+va[k]))); print1(va[n], ", "););} \\ _Michel Marcus_, Mar 28 2016
%Y Cf. A114898, which counts earlier terms m for which a(m) + n is prime.
%Y Cf. A270536, which is the sum of m < n for which a(m) + n is not prime.
%K easy,nonn
%O 1,4
%A _Alec Jones_, Mar 20 2016
|