The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A068915 a(n) = n if n<2; a(n) = |a(n/2)-a(n/2-1)| if n is even, and a(n) = a((n-1)/2) + a((n-1)/2+1) if n is odd. 1
 0, 1, 1, 2, 0, 3, 1, 2, 2, 3, 3, 4, 2, 3, 1, 4, 0, 5, 1, 6, 0, 7, 1, 6, 2, 5, 1, 4, 2, 5, 3, 4, 4, 5, 5, 6, 4, 7, 5, 6, 6, 7, 7, 8, 6, 7, 5, 8, 4, 7, 3, 6, 4, 5, 3, 6, 2, 7, 3, 8, 2, 7, 1, 8, 0, 9, 1, 10, 0, 11, 1, 10, 2, 11, 3, 12, 2, 11, 1, 12, 0, 13, 1, 14, 0, 15, 1, 14, 2, 13, 1, 12, 2, 13, 3, 12, 4, 11, 3, 10, 4, 9, 3, 10, 2, 9, 1, 8, 2, 9, 3, 8, 4, 9, 5, 10, 4, 11, 5, 10 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 LINKS Alois P. Heinz, Table of n, a(n) for n = 0..10000 EXAMPLE a(2) = |1-0| = 1, a(3) = 1+1 = 2, a(4) = |1-1| = 0, a(5) = 1+2 = 3. MAPLE a:= proc(n) option remember;       if n<2 then n     elif irem (n, 2)=0 then abs(a(n/2)-a(n/2-1))     else a((n-1)/2)+a((n-1)/2+1)       fi     end: seq (a(n), n=0..119); CROSSREFS Sequence in context: A080096 A322978 A294142 * A302193 A133925 A071492 Adjacent sequences:  A068912 A068913 A068914 * A068916 A068917 A068918 KEYWORD easy,nonn AUTHOR Aaron K. Johnson (akj(AT)21stcentury.net), Mar 06 2002 EXTENSIONS Edited by Alois P. Heinz, Feb 04 2011 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 4 09:03 EDT 2020. Contains 336201 sequences. (Running on oeis4.)