login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A333047
Number of compositions of 2n into n powers of 2.
3
1, 1, 1, 4, 13, 31, 76, 218, 645, 1849, 5281, 15346, 44980, 131704, 385568, 1131874, 3331429, 9819405, 28977079, 85633438, 253424053, 750895163, 2227288196, 6613217348, 19654450476, 58463536356, 174041552556, 518488451716, 1545686334184, 4610827520500
OFFSET
0,4
LINKS
FORMULA
a(n) = A073266(2n,n).
a(n) mod 2 = 1 <=> n in { A003714 }.
a(n) ~ c * d^n / sqrt(n), where d = 3.03557496500556374352187743150809307334142929675774277... and c = 0.257758082536856928607441503594486605201517917904563... - Vaclav Kotesovec, Mar 10 2020
EXAMPLE
a(3) = 4: 222, 114, 141, 411.
a(4) = 13: 2222, 1124, 1142, 1214, 1241, 1412, 1421, 2114, 2141, 2411, 4112, 4121, 4211.
MAPLE
b:= proc(n, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
`if`(t=0, 0, add(b(n-2^j, t-1), j=0..ilog2(n))))
end:
a:= n-> b(2*n, n):
seq(a(n), n=0..30);
MATHEMATICA
b[n_, t_] := b[n, t] = If[n == 0, If[t == 0, 1, 0], If[t == 0, 0, Sum[b[n - 2^j, t - 1], {j, 0, Floor@Log2[n]}]]];
a[n_] := b[2*n, n];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Mar 28 2022, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A097122 A378850 A116411 * A376804 A106337 A027998
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 06 2020
STATUS
approved