The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS"). Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A079584 Number of ones in the binary expansion of n!. 5
 1, 1, 2, 2, 4, 4, 6, 6, 6, 11, 7, 12, 12, 12, 18, 18, 22, 23, 17, 22, 25, 28, 31, 29, 30, 35, 38, 42, 40, 48, 42, 42, 46, 51, 56, 51, 58, 59, 64, 63, 66, 64, 71, 74, 70, 77, 81, 89, 87, 89, 90, 88, 94, 87, 99, 103, 98, 101, 109, 113, 103, 113, 120, 120, 109, 123, 121, 130, 121 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 Florian Luca, The number of non-zero digits of n!, Canad. Math. Bull. 45 (2002), pp. 115-118. Carlo Sanna, On the sum of digits of the factorial, arXiv:1409.4912 [math.NT], 2014. Carlo Sanna, On the sum of digits of the factorial, Journal of Number Theory 147 (2015), pp. 836-841. FORMULA a(n) << n log n. - Charles R Greathouse IV, Mar 27 2013 a(n) = A000120(A000142(n)). - Michel Marcus, Sep 18 2014 EXAMPLE a(5) = 4 because 5! = 120 and 120_10 = 1111000_2, with 4 ones. MAPLE seq(convert(convert(n!, base, 2), `+`), n=1..1000); # Robert Israel, Sep 18 2014 MATHEMATICA Table[DigitCount[n!, 2, 1], {n, 70}] (* Harvey P. Dale, Jul 10 2012 *) PROG (PARI) for(n=1, 300, b=binary(n!); print1(sum(k=1, length(b), b[k])", ")) (PARI) a(n)=hammingweight(n!) \\ Charles R Greathouse IV, Mar 27 2013 (Python) import math def a(n):     return bin(math.factorial(n))[2:].count("1") # Indranil Ghosh, Dec 23 2016 CROSSREFS Cf. A000120 (binary weight), A000142 (factorial), A004152 (sum of decimal digits). Sequence in context: A070320 A124195 A220662 * A179291 A004079 A096494 Adjacent sequences:  A079581 A079582 A079583 * A079585 A079586 A079587 KEYWORD nonn AUTHOR Jose R. Brox (tautocrona(AT)terra.es), Jan 26 2003 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 23 16:18 EST 2020. Contains 338590 sequences. (Running on oeis4.)