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

%I #17 Jun 16 2018 13:45:07

%S 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,

%T 10,23,14,19,6,22,17,29,13,33,21,30,10,32,23,37,15,35,21,28,8,29,22,

%U 37,16,40,25,35,11,34,24,38,15,34,20,26,7,29,23,40,18,47,30

%N a(1) = 1, a(2n) = a(n)+1, a(2n+1) = a(n)+a(n+1)+1.

%C In the S.-H. Cha reference this is function fog_2(n).

%H Alois P. Heinz, <a href="/A215673/b215673.txt">Table of n, a(n) for n = 1..8192</a>

%H S.-H. Cha, <a href="http://csis.pace.edu/~scha/IS/FOGKN.pdf">On Parity based Divide and Conquer Recursive Functions</a>, International Conference on Computer Science and Applications, San Francisco, USA, 24-26 October 2012

%p a:= proc(n) option remember; 1+ `if`(n=1, 0,

%p `if`(irem(n, 2, 'r')=0, a(r), a(r)+a(r+1)))

%p end:

%p seq(a(n), n=1..80); # _Alois P. Heinz_, Aug 23 2012

%t a[1] = 1;

%t a[n_] := a[n] = If[EvenQ[n], a[n/2] + 1, a[(n-1)/2] + a[(n-1)/2 + 1] + 1];

%t Array[a, 80] (* _Jean-François Alcover_, Jun 16 2018 *)

%Y Cf. A215674, A215675, A215676.

%K nonn

%O 1,2

%A _Sung-Hyuk Cha_, Aug 20 2012

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 17:38 EDT 2024. Contains 374388 sequences. (Running on oeis4.)