|
|
A357534
|
|
Number of compositions (ordered partitions) of n into two or more powers of 2.
|
|
1
|
|
|
0, 0, 1, 3, 5, 10, 18, 31, 55, 98, 174, 306, 542, 956, 1690, 2983, 5271, 9310, 16448, 29050, 51318, 90644, 160118, 282826, 499590, 882468, 1558798, 2753448, 4863696, 8591212, 15175514, 26805983, 47350055, 83639030, 147739848, 260967362, 460972286, 814260544, 1438308328
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
b:= proc(n) option remember;
`if`(n=0, 1, add(b(n-2^i), i=0..ilog2(n)))
end:
a:= n-> b(n)-`if`(2^ilog2(n)=n, 1, 0):
|
|
MATHEMATICA
|
b[n_] := b[n] = If[n == 0, 1, Sum[b[n - 2^i], {i, 0, Floor@ Log2[n]}]];
a[n_] := b[n] - If[2^Floor@Log2[n] == n, 1, 0];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|