reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
$RecursionLimit = 5000;
b[n_] := If[n == 0, 1, b[n - 1]*Prime[n]];
g[n_, k_] := g[n, k] = If[k < 0 || n < 0, 0,
If[k == 0, If[n == 0, 1, 0], g[n - k, k] + k*g[n - k, k - 1]]];
a[n_] := Sum[g[b[n], k], {k, 0, Floor[(Sqrt[8*b[n] + 1] - 1)/2]}];
Table[a[n], {n, 0, 5}] (* Jean-François Alcover, Apr 14 2022, after Alois P. Heinz *)
approved
editing
editing
approved
All terms are odd.
b:= proc(n) b(n):= `if`(n=0, 1, b(n-1)*ithprime(n)) end:
g:= proc(n, k) option remember; `if`(k<0 or n<0, 0,
`if`(k=0, `if`(n=0, 1, 0), g(n-k, k)+k*g(n-k, k-1)))
end:
a:= n-> add(g(b(n), k), k=0..floor((sqrt(8*b(n)+1)-1)/2)):
seq(a(n), n=0..5);
Alois P. Heinz, <a href="/A343119/b343119.txt">Table of n, a(n) for n = 0..6</a>