OFFSET
0,2
COMMENTS
Also binary weight of 10^n, which is verified easily enough: 10^n = 2^n * 5^n; it is obvious that 2^n in binary is a single 1 followed by n 0's, therefore, in the binary expansion of 2^n * 5^n, the 2^n contributes only the trailing zeros. - Alonso del Arte, Oct 28 2012
Conjecture: a(n)/n -> log_4(5) = 1.160964... as n -> oo. - M. F. Hasler, Apr 17 2024
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
Hugo Pfoertner, Plot of a(n) - 1.160964*n, +-4*sqrt(n), n up to 10^6.
FORMULA
a(n) + A118737(n) = A061785(n) + 1 for n >= 1. - Robert Israel, Dec 24 2017 [corrected by Amiram Eldar, Jul 27 2023]
EXAMPLE
a(2) = 3 because 5^2 = 25 is 11001, which has 3 on bits.
MAPLE
seq(convert(convert(5^n, base, 2), `+`), n=0..100); # Robert Israel, Dec 24 2017
MATHEMATICA
Table[DigitCount[5^n, 2, 1], {n, 0, 71}] (* Ray Chandler, Sep 29 2006 *)
PROG
(PARI) a(n) = hammingweight(5^n) \\ Iain Fox, Dec 24 2017
(Python) A118738 = lambda n: (5**n).bit_count() # For Python 3.10 and later. - M. F. Hasler, Apr 17 2024
CROSSREFS
KEYWORD
base,nonn,easy
AUTHOR
Zak Seidov, May 22 2006
STATUS
approved