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 A085062 #26 Feb 26 2025 09:50:32 %S A085062 0,1,1,4,2,4,3,13,4,7,5,13,6,10,7,40,8,13,9,22,10,16,11,40,12,19,13, %T A085062 31,14,22,15,121,16,25,17,40,18,28,19,67,20,31,21,49,22,34,23,121,24, %U A085062 37,25,58,26,40,27,94,28,43,29,67,30,46,31,364,32,49,33,76,34,52,35,121,36,55 %N A085062 a(n) = A085060(n)/9 - 1/3. %C A085062 Interlacing of A001477 and A085060 / 3. - _Ruud H.G. van Tol_, Aug 30 2024 %H A085062 Alois P. Heinz, <a href="/A085062/b085062.txt">Table of n, a(n) for n = 0..10000</a> %H A085062 J. C. Lagarias and N. J. A. Sloane, Approximate squaring (<a href="http://neilsloane.com/doc/apsq.pdf">pdf</a>, <a href="http://neilsloane.com/doc/apsq.ps">ps</a>), Experimental Math., 13 (2004), 113-128. %F A085062 a(n) mod 2 = A292077(n+1). - _Alois P. Heinz_, Jul 01 2023 %F A085062 a(2*n) = n; a(2*n+1) = 3 * a(n) + 1. - _Ruud H.G. van Tol_, Aug 31 2024 %p A085062 a:= n-> `if`(n::odd, a((3*n+1)/2), n/2): %p A085062 seq(a(n), n=0..100); # _Alois P. Heinz_, Jul 01 2023 %o A085062 (PARI) a(n) = ((3/2)^valuation(n++, 2)*n-1)/2; \\ _Ruud H.G. van Tol_, Aug 30 2024 %o A085062 (Python) %o A085062 def A085062(n): return ((k:=n+1)*3**((m:=(-k&k).bit_length())-1)>>m) # _Chai Wah Wu_, Feb 26 2025 %Y A085062 Cf. A085060, A292077. %Y A085062 Bisection gives: A001477 (even part). %K A085062 nonn %O A085062 0,4 %A A085062 _N. J. A. Sloane_, Aug 11 2003