OFFSET
0,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..1000
EXAMPLE
a(2) = 97 because 10^2 = 100, which is 1100100 in binary, having 3 on bits, and 100 - 3 = 97.
a(3) = 994 because 10^3 = 1000, which is 1111101000 in binary, having 6 on bits, and 1000 - 6 = 994.
MATHEMATICA
Table[10^n - DigitCount[10^n, 2, 1], {n, 0, 19}]
PROG
(PARI) a(n)=10^n-hammingweight(5^n) \\ Charles R Greathouse IV, Oct 28 2012
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
EXTENSIONS
More terms from Amiram Eldar, Jul 16 2023
STATUS
approved