A092391 a(n) = n + wt(n), where wt(n) = A000120(n) = binary weight of n.
0, 2, 3, 5, 5, 7, 8, 10, 9, 11, 12, 14, 14, 16, 17, 19, 17, 19, 20, 22, 22, 24, 25, 27, 26, 28, 29, 31, 31, 33, 34, 36, 33, 35, 36, 38, 38, 40, 41, 43, 42, 44, 45, 47, 47, 49, 50, 52, 50, 52, 53, 55, 55, 57, 58, 60, 59, 61, 62, 64, 64, 66, 67, 69, 65, 67, 68, 70, 70, 72, 73, 75
Offset: 0
Links
- Reinhard Zumkeller and Donovan Johnson, Table of n, a(n) for n = 0..10000 (terms up to a(1023) from Reinhard Zumkeller)
- Max A. Alekseyev and N. J. A. Sloane, On Kaprekar's Junction Numbers, arXiv:2112.14365, 2021; Journal of Combinatorics and Number Theory 12:3 (2022), 115-155.
- Index entries for Colombian or self numbers and related sequences
Crossrefs
Programs
-
Haskell
a092391 n = n + a000120 n -- Reinhard Zumkeller, May 13 2012
-
Mathematica
Table[n + Total[IntegerDigits[n, 2]], {n, 0, 100}] (* Jean-François Alcover, Sep 03 2013 *)
-
PARI
A092391(n)=n+hammingweight(n) \\ M. F. Hasler, Oct 05 2013
-
Python
def a(n): return n + bin(n).count("1") print([a(n) for n in range(72)]) # Michael S. Branicky, May 26 2022
Formula
a(n) = n + A000120(n).
G.f.: (1/(1 - x))*Sum_{k>=0} (2^k + 1)*x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Jul 23 2017