OFFSET
2,1
MAPLE
b:= proc(n) option remember; convert(series(`if`(n=0, 1, b(n-1)*
(`if`(n=1, 1, ithprime(n-1))*x+1)), x, 3), polynom)
end:
a:= n-> coeff(b(n), x, 2):
seq(a(n), n=2..40); # Alois P. Heinz, Sep 08 2019
MATHEMATICA
b[n_] := b[n] = Series[If[n == 0, 1, b[n - 1]*(If[n == 1, 1, Prime[n - 1]]*x + 1)], {x, 0, 3}] // Normal;
a[n_] := Coefficient[b[n], x, 2];
Table[a[n], {n, 2, 40}] (* Jean-François Alcover, Dec 26 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved