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!)
A287477 a(0) = 0; a(1) = 1; a(2*n) = n - a(a(n)), a(2*n+1) = a(n-a(n)) + a(n-a(n+1)). 4
0, 1, 0, 1, 2, 1, 2, 1, 4, 1, 4, 3, 6, 3, 6, 3, 6, 3, 8, 5, 8, 3, 10, 5, 10, 3, 12, 5, 12, 7, 14, 7, 14, 7, 16, 7, 14, 7, 18, 9, 16, 9, 20, 11, 18, 9, 22, 11, 20, 9, 24, 13, 20, 9, 26, 13, 22, 9, 28, 13, 24, 11, 30, 13, 26, 11, 32, 15, 28, 13, 34, 15, 30, 17, 36, 19, 30, 15, 38, 19, 34, 17, 40, 17, 34, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
A variation on Hofstadter's G-sequence, Hofstadter's Q-sequence and Stern's diatomic sequence.
LINKS
Eric Weisstein's World of Mathematics, Stern's Diatomic Series
Eric Weisstein's World of Mathematics, Hofstadter G-Sequence
Eric Weisstein's World of Mathematics, Hofstadter's Q-Sequence
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := If[EvenQ[n], n/2 - a[a[n/2]], a[(n - 1)/2 - a[(n - 1)/2]] + a[(n - 1)/2 - a[(n + 1)/2]]]; Table[a[n], {n, 0, 85}]
CROSSREFS
Sequence in context: A067044 A325677 A343411 * A231473 A216652 A331980
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, May 25 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 April 24 14:32 EDT 2024. Contains 371960 sequences. (Running on oeis4.)