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!)
A166267 Number of 1's in the binary representation of A000129(n). 1
0, 1, 1, 2, 2, 4, 3, 4, 4, 7, 5, 8, 6, 7, 10, 11, 10, 8, 13, 12, 12, 14, 16, 17, 11, 14, 17, 20, 16, 17, 19, 21, 23, 17, 17, 19, 24, 24, 25, 18, 29, 26, 29, 26, 26, 29, 35, 29, 26, 40, 29, 33, 33, 38, 36, 34, 28, 38, 42, 40, 37, 34, 40, 27, 45, 35, 37, 41, 40, 44, 48, 45, 41, 45 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
FORMULA
a(n) = A000120(A000129(n)). - R. J. Mathar, Oct 28 2009
MATHEMATICA
Clear[a, b, c, f, n, lst] f[n_]:=Plus@@IntegerDigits[n, 2]; a=1; b=0; c=0; lst={b}; Do[c=a+b+c; AppendTo[lst, f[c]]; a=b; b=c, {n, 5!}]; lst
DigitCount[LinearRecurrence[{2, 1}, {0, 1}, 100], 2, 1] (* Amiram Eldar, Jul 29 2023 *)
PROG
(Python)
def A000129(n):
if n <=1:
return n
else:
return 2*A000129(n-1)+A000129(n-2)
def A000120(n):
a=0
sh=n
while sh > 0:
a += sh & 1
sh >>= 1
return a
def A166267(n):
return A000120(A000129(n))
print([A166267(n) for n in range(30)])
# R. J. Mathar, Oct 18 2009
CROSSREFS
Sequence in context: A094950 A087874 A363341 * A117484 A086835 A046701
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
Keyword:base added by R. J. Mathar, Oct 28 2009
Offset changed to 0 by Georg Fischer, Dec 19 2020
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 24 19:46 EDT 2024. Contains 375417 sequences. (Running on oeis4.)