editing
approved
editing
approved
nonn,look,new
approved
editing
editing
approved
aa
a(n) = [x^n] x * Product_{j>=0} (1 + x^(2^j) + n*x^(2^(j+1))).
Alois P. Heinz, <a href="/A342643/b342643.txt">Table of n, a(n) for n = 0..16384</a>
`if`(p=1, i*0, b(h, i)+, i*b(h+1, , i), +b(h, +1, i)))(iquo(n, 2, 'p')))
Cf. A002487.
a(2^n) = 1 for n >= 0.
b:= proc(n, ki) option remember; `if`(n<2, n, (qh->
`if`(dp=1, ki*b(q, kh, i)+b(qh+1, ki), b(q, kh, i)))(iquo(n, 2, 'dp')))
seq(a(n), n=0..5055);
0, 1, 1, 4, 1, 11, 7, 57, 1, 28, 21, 265, 13, 365, 211, 3616, 1, 69, 55, 1141, 41, 1828, 1013, 25439, 25, 1951, 1405, 41608, 813, 50519, 27931, 954305, 1, 166, 137, 5041, 109, 8363, 4447, 182638, 81, 10251, 7183, 327403, 3961, 372736, 198997, 9971521, 49, 9801
0,14
b:= proc(n, k) option remember; `if`(n<2, n, (q->
`if`(d=1, k*b(q, k)+b(q+1, k), b(q, k)))(iquo(n, 2, 'd')))
end:
a:= n-> b(n$2):
seq(a(n), n=0..50);