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 A125711 #22 Apr 02 2025 16:44:39 %S A125711 1,3,175,7,47,431,87791,15,743151,111,22255,943,751,218863,175087,31, %T A125711 5871,1791727,1431279,239,191,55023,44015,1967,11917039,1775, %U A125711 3515647479163389605506303638875119,481007,382703,437231,108202665749908974283165422824431,63,95803119 %N A125711 In the "3x+1" problem, let 1 denote a halving step and 0 denote an x->3x+1 step. Then a(n) is obtained by writing the sequence of steps needed to reach 1 from 2n and reading it as a decimal number. %H A125711 Alois P. Heinz, <a href="/A125711/b125711.txt">Table of n, a(n) for n = 1..10000</a> %H A125711 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %e A125711 6 -> 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1, so a(3) is the decimal equivalent of 10101111, which is 175. %p A125711 b:= proc(n) option remember; `if`(n=1, [0$2], `if`(n::even, %p A125711 (p-> p+[1, 2^p[1]])(b(n/2)), (p-> p+[1, 0])(b(3*n+1)))) %p A125711 end: %p A125711 a:= n-> b(2*n)[2]: %p A125711 seq(a(n), n=1..33); # _Alois P. Heinz_, Apr 02 2025 %t A125711 f[x_] := If[EvenQ[x], x/2, 3x + 1];g[n_] := FromDigits[Mod[Most[NestWhileList[f, 2n, # > 1 &]], 2, 1] - 1, 2];Table[g[n], {n, 40}] (* _Ray Chandler_, Feb 02 2007 *) %Y A125711 Cf. A006577, A125710, A125626. %K A125711 nonn,look,base %O A125711 1,2 %A A125711 _N. J. A. Sloane_, Feb 01 2007 %E A125711 Extended by _Ray Chandler_, Feb 02 2007