OFFSET
0,2
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.
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
MATHEMATICA
Table[n + Total[IntegerDigits[n, 2]], {n, 0, 100}] (* Jean-François Alcover, Sep 03 2013 *)
PROG
(Haskell) a092391 n = n + a000120 n -- Reinhard Zumkeller, May 13 2012
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, May 08 2004
STATUS
approved