login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
a(n) = A023359(n) - A209229(n) for n > 0.
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):
seq(a(n), n=0..50); # Alois P. Heinz, Oct 02 2022
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];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Dec 26 2022, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A227208 A009854 A298116 * A018165 A054179 A010049
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Oct 02 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 18 18:09 EDT 2024. Contains 376002 sequences. (Running on oeis4.)