

A215675


a(1) = 1, a(n) = 2 if 1<n<=3, a(2n+1) = a(n)+1, a(2n+2) = a(n)+a(n+1)+1 otherwise.


4



1, 2, 2, 4, 3, 5, 3, 7, 5, 8, 4, 9, 6, 9, 4, 11, 8, 13, 6, 14, 9, 13, 5, 14, 10, 16, 7, 16, 10, 14, 5, 16, 12, 20, 9, 22, 14, 20, 7, 21, 15, 24, 10, 23, 14, 19, 6, 20, 15, 25, 11, 27, 17, 24, 8, 24, 17, 27, 11, 25, 15, 20, 6, 22, 17, 29, 13, 33, 21, 30, 10
(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, 2426 October 2012.


FORMULA

G.f. A(x) satisfies: A(x) = x/(1  x) + (1 + x + x^2) * A(x^2).  Ilya Gutkovskiy, May 23 2020


MAPLE

a:= proc(n) option remember; 1+ `if`(n=1, 0, `if`(n<=3, 1,
`if`(irem(n1, 2, 'r')=0, a(r), a(r)+a(r+1))))
end:
seq (a(n), n=1..80); # Alois P. Heinz, Aug 23 2012


CROSSREFS

Cf. A215673, A215674, A215676.
Sequence in context: A269502 A054346 A145393 * A329439 A132802 A341947
Adjacent sequences: A215672 A215673 A215674 * A215676 A215677 A215678


KEYWORD

nonn


AUTHOR

SungHyuk Cha, Aug 20 2012


STATUS

approved



