login
A093659
First column of lower triangular matrix A093658; factorial of the number of 1's in binary expansion of n.
12
1, 1, 1, 2, 1, 2, 2, 6, 1, 2, 2, 6, 2, 6, 6, 24, 1, 2, 2, 6, 2, 6, 6, 24, 2, 6, 6, 24, 6, 24, 24, 120, 1, 2, 2, 6, 2, 6, 6, 24, 2, 6, 6, 24, 6, 24, 24, 120, 2, 6, 6, 24, 6, 24, 24, 120, 6, 24, 24, 120, 24, 120, 120, 720, 1, 2, 2, 6, 2, 6, 6, 24, 2, 6, 6, 24, 6
OFFSET
0,4
COMMENTS
a(n) is the number of compositions of n into distinct powers of 2. - Vladimir Shevelev, Jan 15 2014
FORMULA
a(2^n) = n! for n>=0. a(2^n+2^m) = a(2^(m+1)) for n>m>=0.
a(n) = A000120(n)! = A000142(A000120(n)).
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
KEYWORD
nonn,base
AUTHOR
Paul D. Hanna, Apr 08 2004
STATUS
approved