OFFSET
0,3
COMMENTS
In fact only one initial value is needed.
If initial values were {a(0)=0, a(1)=1} then we would get A014687.
prime(10) + prime(11) = 29 + 31 = a(10) + a(11) = 31 + 29 (order was reversed!).
If initial values were {a(0)=1, a(1)=2} then (after a(0)=1) we would get A000040, the primes, and would have prime(10) + prime(11) = 29 + 31 = a(10) + a(11) = 29 + 31 (identity).
Initial values {a(0)=1, a(1)=3} would give A014686.
FORMULA
a(n) = prime(n) + 2*(-1)^n. - George Beck, Jun 03 2022
MATHEMATICA
g[x_] := Prime[x]+Prime[x-1]-g[x-1] g[0]=0; g[1]=0; Table[g[w], {w, 0, 100}]
Prepend[Table[Prime[n] + 2 (-1)^n, {n, 59}], 0] (* George Beck, Jun 03 2022 *)
PROG
(PARI) lista(nn) = {print1(a=0, ", "); print1(a, ", "); for (n=2, nn, a = prime(n) + prime(n-1) - a; print1(a, ", "); ); } \\ Michel Marcus, Apr 06 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Apr 25 2003
EXTENSIONS
Name corrected by George Beck, Jun 03 2022
STATUS
approved