login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A218451 a(n) = 10^n minus its binary weight. 1

%I #16 Jul 16 2023 02:08:56

%S 0,8,97,994,9995,99994,999993,9999992,99999988,999999987,9999999989,

%T 99999999985,999999999987,9999999999986,99999999999983,

%U 999999999999980,9999999999999980,99999999999999980,999999999999999976,9999999999999999981,99999999999999999974

%N a(n) = 10^n minus its binary weight.

%H Amiram Eldar, <a href="/A218451/b218451.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = 10^n - A000120(10^n).

%F a(n) = 10^n - A118738(n).

%e a(2) = 97 because 10^2 = 100, which is 1100100 in binary, having 3 on bits, and 100 - 3 = 97.

%e a(3) = 994 because 10^3 = 1000, which is 1111101000 in binary, having 6 on bits, and 1000 - 6 = 994.

%t Table[10^n - DigitCount[10^n, 2, 1], {n, 0, 19}]

%o (PARI) a(n)=10^n-hammingweight(5^n) \\ _Charles R Greathouse IV_, Oct 28 2012

%Y Cf. A000120, A011371, A118738.

%K nonn,easy,base

%O 0,2

%A _Alonso del Arte_, Oct 28 2012, based on examples for A011371 from _Hieronymus Fischer_, Jun 06 2012.

%E More terms from _Amiram Eldar_, Jul 16 2023

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 04:31 EDT 2024. Contains 371767 sequences. (Running on oeis4.)