login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

Alois P. Heinz, Table of n, a(n) for n = 1..8192

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

Cf. A215674, A215675, A215676.

Sequence in context: A064357 A191735 A191666 * A120619 A346298 A084385

Adjacent sequences:  A215670 A215671 A215672 * A215674 A215675 A215676

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 26 21:07 EST 2021. Contains 349344 sequences. (Running on oeis4.)