login
A078565
Number of zeros in the binary expansion of n!.
3
0, 0, 1, 1, 3, 3, 6, 7, 10, 13, 11, 19, 17, 21, 25, 23, 27, 27, 30, 40, 40, 41, 42, 44, 51, 54, 54, 56, 56, 63, 60, 71, 76, 77, 77, 77, 88, 86, 90, 90, 97, 99, 106, 105, 107, 117, 115, 117, 114, 122, 126, 130, 138, 138, 151, 144, 146, 157, 160, 158, 160, 176
OFFSET
0,5
FORMULA
a(n) = A072831(n) - A079584(n). - Michel Marcus, Dec 23 2016
EXAMPLE
a(4) = 3 because 4! = 24_10 = 11000_2 and it has 3 zero digits.
MATHEMATICA
Table[Count[IntegerDigits[n!, 2], 0], {n, 0, 100}] (* T. D. Noe, Apr 10 2012 *)
DigitCount[Range[0, 70]!, 2, 0] (* Harvey P. Dale, Mar 11 2019 *)
PROG
(PARI) for(n=1, 300, b=binary(n!); print1(sum(k=1, length(b), if(b[k], 0, 1))", "))
(Python)
import math
def a(n):
return bin(math.factorial(n))[2:].count("0")
# Indranil Ghosh, Dec 23 2016
CROSSREFS
Sequence in context: A333885 A270060 A350636 * A211541 A026926 A332557
KEYWORD
nonn,base
AUTHOR
Jose R. Brox (tautocrona(AT)terra.es), Jan 26 2003
STATUS
approved