A136494 Number of permutation symmetries in the binary expansion of n.
1, 1, 1, 2, 2, 2, 2, 6, 6, 4, 4, 6, 4, 6, 6, 24, 24, 12, 12, 12, 12, 12, 12, 24, 12, 12, 12, 24, 12, 24, 24, 120, 120, 48, 48, 36, 48, 36, 36, 48, 48, 36, 36, 48, 36, 48, 48, 120, 48, 36, 36, 48, 36, 48, 48, 120, 36, 48, 48, 120, 48, 120, 120, 720, 720
Offset: 0
Examples
a(14) = 6 because there are 3! permutation symmetries of 1's * the 0! permutation symmetries of 0's.
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..1023
Programs
-
Mathematica
a[n_] := Times @@ (DigitCount[n, 2]!); Array[a, 65, 0] (* Amiram Eldar, Jul 29 2023 *)
-
PARI
a(n) = {if(n==0, 1, my(w=hammingweight(n)); w!*(1+logint(n,2)-w)!)} \\ Andrew Howroyd, Jan 12 2020
Extensions
Terms a(32) and beyond from Andrew Howroyd, Jan 12 2020