OFFSET
0,1
LINKS
Robert Israel, Table of n, a(n) for n = 0..4775
FORMULA
a(n) = a(n-1) + a(n-2) + prime(n+1). - Alois P. Heinz, Feb 19 2023
MAPLE
N:= 100: # to get a(0)..a(N)
G:= add(ithprime(i)*x^(i-1), i=1..N+1):
S:= series(G /(1-x-x^2), x, N+1):
seq(coeff(S, x, n), n=0..N); # Robert Israel, Jan 18 2018
# second Maple program:
a:= proc(n) option remember; `if`(n<0, 0,
a(n-1)+a(n-2)+ithprime(n+1))
end:
seq(a(n), n=0..35); # Alois P. Heinz, Feb 19 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved