The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A297208 a(0)=0; for n >= 1, a(n) = a(n-1-A023416(n)) + A000120(n). 1
0, 1, 1, 3, 2, 5, 4, 7, 3, 6, 9, 9, 8, 12, 11, 15, 10, 14, 13, 13, 12, 16, 16, 20, 14, 19, 23, 23, 22, 27, 26, 31, 24, 24, 29, 34, 33, 27, 32, 37, 36, 30, 35, 40, 39, 39, 44, 44, 42, 42, 47, 46, 45, 51, 50, 56, 48, 54, 60, 59, 58, 64, 63, 69, 55, 61, 60, 66, 65, 58, 64, 70, 62, 68 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
B. Balamohan, A. Kuznetsov and S. Tanny, On the behavior of a variant of Hofstadter's Q-sequence, J. Integer Sequences, Vol. 10 (2007), Article 07.7.1.
Nathaniel D. Emerson, A Family of Meta-Fibonacci Sequences Defined by Variable-Order Recursions, J. Integer Sequences, Vol. 9 (2006), Article 06.1.8.
EXAMPLE
For n = 7, A023416(7) = 0, A000120(7) = 3 so a(7) = a(6) + 3 , a(6) = a(4) + 2, a(4) = a(1) + 1 , a(1) = a(0) + 1 , a(0) = 0. Thus a(7)= 0 + 1 + 1 + 2 + 3 = 7.
MATHEMATICA
a[0] = 0; a[n_] := a[n] = a[n - 1 - DigitCount[n, 2, 0]] + DigitCount[n, 2, 1]; Array[a, 100, 0] (* Amiram Eldar, Jul 20 2023 *)
PROG
(PARI) a(n) = if (n==0, 0, a(n-1-#binary(n)+hammingweight(n)) + hammingweight(n)); \\ Michel Marcus, Dec 27 2017
CROSSREFS
Sequence in context: A194869 A191736 A372654 * A372358 A301941 A344547
KEYWORD
nonn,base
AUTHOR
Ctibor O. Zizka, Dec 27 2017
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 May 15 21:53 EDT 2024. Contains 372549 sequences. (Running on oeis4.)