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!)
A215673 a(1) = 1, a(2n) = a(n)+1, a(2n+1) = a(n)+a(n+1)+1. 5
1, 2, 4, 3, 7, 5, 8, 4, 11, 8, 13, 6, 14, 9, 13, 5, 16, 12, 20, 9, 22, 14, 20, 7, 21, 15, 24, 10, 23, 14, 19, 6, 22, 17, 29, 13, 33, 21, 30, 10, 32, 23, 37, 15, 35, 21, 28, 8, 29, 22, 37, 16, 40, 25, 35, 11, 34, 24, 38, 15, 34, 20, 26, 7, 29, 23, 40, 18, 47, 30 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
In the S.-H. Cha reference this is function fog_2(n).
LINKS
S.-H. Cha, On Parity based Divide and Conquer Recursive Functions, International Conference on Computer Science and Applications, San Francisco, USA, 24-26 October 2012
MAPLE
a:= proc(n) option remember; 1+ `if`(n=1, 0,
`if`(irem(n, 2, 'r')=0, a(r), a(r)+a(r+1)))
end:
seq(a(n), n=1..80); # Alois P. Heinz, Aug 23 2012
MATHEMATICA
a[1] = 1;
a[n_] := a[n] = If[EvenQ[n], a[n/2] + 1, a[(n-1)/2] + a[(n-1)/2 + 1] + 1];
Array[a, 80] (* Jean-François Alcover, Jun 16 2018 *)
CROSSREFS
Sequence in context: A064357 A191735 A191666 * A352716 A120619 A346298
KEYWORD
nonn
AUTHOR
Sung-Hyuk Cha, Aug 20 2012
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 July 18 15:51 EDT 2024. Contains 374388 sequences. (Running on oeis4.)