cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A215675 #23 Apr 24 2022 06:30:51
%S A215675 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,
%T A215675 14,5,16,12,20,9,22,14,20,7,21,15,24,10,23,14,19,6,20,15,25,11,27,17,
%U A215675 24,8,24,17,27,11,25,15,20,6,22,17,29,13,33,21,30,10
%N 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.
%C A215675 In the S.-H. Cha reference this is function ~fog_2(n).
%H A215675 Alois P. Heinz, <a href="/A215675/b215675.txt">Table of n, a(n) for n = 1..8192</a>
%H A215675 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.
%F A215675 G.f. A(x) satisfies: A(x) = x/(1 - x) + (1 + x + x^2) * A(x^2). - _Ilya Gutkovskiy_, May 23 2020
%p A215675 a:= proc(n) option remember; 1+ `if`(n=1, 0, `if`(n<=3, 1,
%p A215675       `if`(irem(n-1, 2, 'r')=0, a(r), a(r)+a(r+1))))
%p A215675     end:
%p A215675 seq (a(n), n=1..80);  # _Alois P. Heinz_, Aug 23 2012
%t A215675 a[n_] := a[n] = If[n < 3, n, {q, r} = QuotientRemainder[n, 2];
%t A215675      Switch[r, 1, a[q] + 1, 0, a[q-1] + a[q] + 1]];
%t A215675 Table[a[n], {n, 1, 80}] (* _Jean-François Alcover_, Apr 24 2022 *)
%Y A215675 Cf. A215673, A215674, A215676.
%K A215675 nonn
%O A215675 1,2
%A A215675 _Sung-Hyuk Cha_, Aug 20 2012