OFFSET
0,4
COMMENTS
a(n) is the number of compositions of n into distinct powers of 2. - Vladimir Shevelev, Jan 15 2014
LINKS
FORMULA
MAPLE
a:= n-> add(i, i=Bits[Split](n))!:
seq(a(n), n=0..80); # Alois P. Heinz, Nov 02 2024
MATHEMATICA
Table[DigitCount[n, 2, 1]!, {n, 0, 70}] (* Harvey P. Dale, Jul 09 2019 *)
PROG
(Python)
from math import factorial
def a(n): return factorial(n.bit_count()) # Michael S. Branicky, Nov 02 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paul D. Hanna, Apr 08 2004
STATUS
approved