OFFSET
1,2
COMMENTS
Inverse weigh transform of {1, primes}.
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(binomial(a(i), j)*b(n-i*j, i-1), j=0..n/i)))
end:
a:= proc(n) option remember; `if`(n=1, 1, ithprime(n-1))-b(n, n-1) end:
seq(a(n), n=1..60); # Alois P. Heinz, Apr 28 2022
MATHEMATICA
p[n_] := If[n == 1, 1, Prime[n - 1]]; b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[a[i], j] b[n - i j, i - 1], {j, 0, n/i}]]]; a[n_] := a[n] = p[n] - b[n, n - 1]; Table[a[n], {n, 1, 57}]
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Apr 28 2022
STATUS
approved