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!)
A348367 a(n) = w(n + w(n)), where w(n) is the binary weight of n, A000120(n). 3
1, 2, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 1, 2, 3, 2, 3, 2, 3, 3, 2, 3, 4, 3, 3, 4, 5, 5, 2, 2, 2, 2, 3, 2, 3, 3, 2, 3, 4, 3, 3, 4, 5, 5, 3, 3, 3, 3, 3, 4, 5, 5, 4, 4, 4, 5, 5, 5, 1, 1, 2, 3, 3, 2, 3, 2, 3, 3, 2, 3, 4, 3, 3, 4, 5, 5, 3, 3, 3, 3, 3, 4, 5, 5, 4, 4, 4, 5, 5, 5, 2, 2, 3, 4, 4, 3, 3, 4, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = A000120(n + A000120(n)); a(n) = A000120(A092391(n)).
EXAMPLE
n = 5; a(5) = A000120(5 + A000120(5)) = 3.
MATHEMATICA
h[n_] := DigitCount[n, 2, 1]; a[n_] := h[n + h[n]]; Array[a, 100] (* Amiram Eldar, Oct 15 2021 *)
PROG
(Python)
def h(n): return bin(n).count('1')
def a(n): return h(n + h(n))
print([a(n) for n in range(1, 100)]) # Michael S. Branicky, Oct 15 2021
(PARI) a(n) = hammingweight(n + hammingweight(n)); \\ Michel Marcus, Oct 17 2021
CROSSREFS
Sequence in context: A010244 A141298 A256915 * A209254 A227738 A103960
KEYWORD
nonn,base
AUTHOR
Ctibor O. Zizka, Oct 15 2021
STATUS
approved

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 August 27 00:51 EDT 2024. Contains 375462 sequences. (Running on oeis4.)