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 A061420 #72 Sep 08 2022 08:45:03 %S A061420 0,1,2,3,3,4,4,4,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8, %T A061420 8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10, %U A061420 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 %N A061420 a(n) = a(ceiling((n-1)*2/3)) + 1 with a(0) = 0. %C A061420 Least k such that f^(k)(n) = 0 where f(x) = floor(2/3*x) and f^(k+1)(x) = f(f^(k)(x)). - _Benoit Cloitre_, May 26 2007 %C A061420 Number of 3:2 compressor stages in a Wallace tree multiplier starting with (n+2) partial products. - _Chinmaya Dash_, Aug 18 2020 %H A061420 Clark Kimberling, <a href="/A061420/b061420.txt">Table of n, a(n) for n = 0..2000</a> %H A061420 K. A. C. Bickerstaff, M. Schulte and E. E. Swartzlander, <a href="https://doi.ieeecomputersociety.org/10.1109/ASAP.1993.397168">Reduced area multipliers</a>, Proceedings of International Conference on Application Specific Array Processors (ASAP '93), Venice, Italy, 1993, pp. 478-489. See Table 1 p. 480. %H A061420 William J. Gilbert, <a href="https://doi.org/10.1016/0022-247X(81)90262-6">Radix Representations of Quadratic Fields</a>, Journal of Mathematical Analysis and Applications 83 (1981) pp 264-274. Gilbert (page 273) cites Wang and Washburn (below) in connection with the length of the base 3/2 expansion of the even positive integers. %H A061420 A. M. Odlyzko and H. S. Wilf, <a href="https://doi.org/10.1017/S0017089500008272">Functional iteration and the Josephus problem</a>, Glasgow Math. J. 33, 235-240, 1991. %H A061420 E. T. H. Wang, Phillip C. Washburn, <a href="http://www.jstor.org/stable/2322068">Problem E2604</a>, American Mathematical Monthly 84 (1977) pp. 821-822. %H A061420 <a href="/index/J#Josephus">Index entries for sequences related to the Josephus Problem</a> %F A061420 a(n) = a(n-1) + 1 if n is in A061419; a(n) = a(n-1) otherwise. %F A061420 From _Clark Kimberling_, Oct 19 2012: (Start) %F A061420 a(n) = a(floor(2*n/3)) + 1, where a(0) = 0 (alternative definition). %F A061420 Washburn's solution of Problem E2604 (see References) shows that (for n>0), a(n) = -floor(-L((n+1)/c)), where L is the logarithm with base 3/2 and %F A061420 c = lim_{n->infinity} (2/3)^n*s(n) where s(n) = floor(3*s(n-1)/2) + 1 and s(0)=0. The editors state that "It may be interesting to know whether c is irrational or even transcendental"; c = 1.62227050288476731595695098289932... . %F A061420 Odlyzko and Wilf also discuss the defining recurrence, and they, after Washburn, give a formula for the sequence using c, as in the third Mathematica program below. %F A061420 (End) %e A061420 a(10) = a(ceiling(9*2/3)) + 1 = a(6) + 1 = 4 + 1 = 5. %p A061420 a:= n-> `if`(n=0, 0, a(ceil((n-1)*2/3))+1): %p A061420 seq(a(n), n=0..100); # _Alois P. Heinz_, Oct 29 2012 %t A061420 (* 1st program, using the alternative definition *) %t A061420 a[0] = 0; a[n_] := a[Floor[2 n/3]] + 1; %t A061420 Table[a[n], {n, 0, 120}] %t A061420 (* 2nd program, using Cloitre's recurrence *) %t A061420 f[x_] := Floor[2 x/3]; g[0, x_] := f[x]; %t A061420 g[k_, x_] := f[g[k - 1, x]]; %t A061420 u[n_] := Flatten[Table[g[k, n], {k, 0, 12}]] %t A061420 v[n_] := First[Position[u[n], 0]]; %t A061420 Flatten[Table[v[n], {n, 1, 120}]] %t A061420 (* 3rd program, using the constant c *) %t A061420 f[n_] := -Floor[-Log[3/2, (n + 1)/1.62227050288476731595695098289932]] %t A061420 Table[f[n], {n, 1, 120}] %t A061420 (* _Clark Kimberling_, Oct 23 2012 *) %o A061420 (PARI) a(n) = if(n<0, 0, s=n; c=0; while(floor(s)>0, s=floor(2/3*s); c++); c) \\ _Benoit Cloitre_, May 26 2007 %o A061420 (Magma) [IsZero(n) select 0 else Self(Floor(2*n/3)+1)+1: n in [0..90]]; // _Bruno Berselli_, Oct 31 2012 %Y A061420 Cf. A029837, A061419, A083286 (the constant c). %K A061420 nonn %O A061420 0,3 %A A061420 _Henry Bottomley_, May 02 2001