OFFSET
1,1
COMMENTS
Inverse weigh transform of odd 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; ithprime(n+1)-b(n, n-1) end:
seq(a(n), n=1..50); # Alois P. Heinz, Apr 28 2022
MATHEMATICA
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] = Prime[n + 1] - b[n, n - 1]; Table[a[n], {n, 1, 41}]
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Apr 28 2022
STATUS
approved