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 A006166 M2270 #25 Oct 13 2022 07:50:49 %S A006166 0,1,1,3,3,3,3,5,7,9,9,9,9,9,9,9,9,9,9,11,13,15,17,19,21,23,25,27,27, %T A006166 27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27, %U A006166 27,27,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69 %N A006166 a(0)=0, a(1)=a(2)=1; for n >= 1, a(3n+2) = 2a(n+1) + a(n), a(3n+1) = a(n+1) + 2a(n), a(3n) = 3a(n). %D A006166 J. Arkin, D. C. Arney, L. S. Dewald and W. E. Ebel, Jr., Families of recursive sequences, J. Rec. Math., 22 (No. 22, 1990), 85-94. %D A006166 vN. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A006166 Jean-Paul Allouche and Jeffrey Shallit, <a href="http://dx.doi.org/10.1016/S0304-3975(03)00090-2">The ring of k-regular sequences, II</a>, Theoret. Computer Sci., 307 (2003), 3-29. [<a href="http://www.math.jussieu.fr/~allouche/kreg2.ps">Preprint</a>.] %H A006166 Hsien-Kuei Hwang, Svante Janson and Tsung-Hsi Tsai, <a href="http://140.109.74.92/hk/wp-content/files/2016/12/aat-hhrr-1.pdf">Exact and asymptotic solutions of the recurrence f(n) = f(floor(n/2)) + f(ceiling(n/2)) + g(n): theory and applications</a>, preprint, 2016. %H A006166 Hsien-Kuei Hwang, Svante Janson and Tsung-Hsi Tsai, <a href="https://doi.org/10.1145/3127585">Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications</a>, ACM Transactions on Algorithms, Vol. 13, No. 4 (2017), Article #47. %F A006166 From _Peter Bala_, Oct 08 2022: (Start) %F A006166 a(n+2) - a(n) = 0 or 2. %F A006166 a(3^k + j) = 3^k for k >= 0 and for 0 <= j <= 3^k. %F A006166 a(2*3^k + j) = 3^k + 2*j for k >= 0 and for 0 <= j <= 3^k. %F A006166 A081134(n) = n - a(n). (End) %Y A006166 a(n) + n = A003605(n). Cf. A006165, A080678, A081134. %K A006166 nonn,easy %O A006166 0,4 %A A006166 _N. J. A. Sloane_ %E A006166 More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 28 2003