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.
%I A215676 #18 Sep 01 2022 06:01:57 %S A215676 1,2,2,2,4,4,3,5,5,3,5,5,3,7,7,5,9,9,5,8,8,4,9,9,6,11,11,6,9,9,4,9,9, %T A215676 6,11,11,6,9,9,4,11,11,8,15,15,8,13,13,6,15,15,10,19,19,10,15,15,6,14, %U A215676 14,9,17,17,9,13,13,5,14,14,10,19,19,10,16,16,7 %N A215676 a(1) = 1, a(n) = 2 if 1<n<=4, a(3n+1) = a(n)+1, a(3n+2) = a(3n+3) = a(n)+a(n+1)+1 otherwise. %C A215676 In the S.-H. Cha reference this is function ~fog_3(n). %H A215676 Alois P. Heinz, <a href="/A215676/b215676.txt">Table of n, a(n) for n = 1..8192</a> %H A215676 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 A215676 a:= proc(n) option remember; 1+ `if`(n=1, 0, `if`(n<=4, 1, %p A215676 `if`(irem(n-1, 3, 'r')=0, a(r), a(r)+a(r+1)))) %p A215676 end: %p A215676 seq (a(n), n=1..80); # _Alois P. Heinz_, Aug 23 2012 %t A215676 a[n_] := a[n] = Switch[n, 1, 0, 2|3|4, 1, _, {q, r} = QuotientRemainder[n-1, 3]; If[r == 0, a[q], a[q]+a[q+1]]]+1; %t A215676 Table[a[n], {n, 1, 80}] (* _Jean-François Alcover_, Sep 01 2022 *) %Y A215676 Cf. A215673, A215674, A215675. %K A215676 nonn %O A215676 1,2 %A A215676 _Sung-Hyuk Cha_, Aug 20 2012