OFFSET
1,4
LINKS
Peter Kagey, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 0;
a(2) = 1 because 2 + a(1) is prime
a(3) = 1 because 3 + a(1) is prime
a(4) = 5 because 4 + a(2) = 4 + a(3) is prime; 2 + 3 = 5
PROG
(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
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Alec Jones, Mar 20 2016
STATUS
approved