OFFSET
0,7
COMMENTS
Number of ways to write n as an ordered sum of 5 powers of 2. - Ilya Gutkovskiy, Feb 02 2021
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..10000
MAPLE
b:= proc(n, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
`if`(t<1, 0, add(b(n-2^j, t-1), j=0..ilog2(n))))
end:
a:= n-> b(n, 5):
seq(a(n), n=0..62); # Alois P. Heinz, Feb 02 2021
MATHEMATICA
b[n_, t_] := b[n, t] = If[n == 0, If[t == 0, 1, 0],
If[t < 1, 0, Sum[b[n - 2^j, t - 1], {j, 0, Floor@Log2[n]}]]];
a[n_] := b[n, 5];
Table[a[n], {n, 0, 62}] (* Jean-François Alcover, Apr 25 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 22 2009
STATUS
approved