[go: up one dir, main page]

login
A230300
a(n) = n + wt(n-1), where wt() = A000120() is the binary weight.
3
1, 3, 4, 6, 6, 8, 9, 11, 10, 12, 13, 15, 15, 17, 18, 20, 18, 20, 21, 23, 23, 25, 26, 28, 27, 29, 30, 32, 32, 34, 35, 37, 34, 36, 37, 39, 39, 41, 42, 44, 43, 45, 46, 48, 48, 50, 51, 53, 51, 53, 54, 56, 56, 58, 59, 61, 60, 62, 63, 65, 65, 67, 68, 70, 66, 68, 69, 71, 71, 73, 74, 76, 75, 77, 78, 80, 80, 82, 83, 85, 83, 85
OFFSET
1,2
COMMENTS
A228085(m-1) gives the number of times m occurs in this sequence.
MAPLE
a:= n-> n+add(i, i=Bits[Split](n-1)):
seq(a(n), n=1..82); # Alois P. Heinz, Jul 05 2024
MATHEMATICA
Table[n+Total[IntegerDigits[n-1, 2]], {n, 100}] (* Harvey P. Dale, May 20 2015 *)
PROG
(PARI) a(n) = n + hammingweight(n-1); \\ Michel Marcus, Jul 05 2024
CROSSREFS
Cf. A000120, A092391, A228085, A230301 (complement).
Sequence in context: A064800 A078574 A347299 * A347318 A275883 A274529
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Oct 23 2013
STATUS
approved