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 A112695 #17 Feb 16 2025 08:32:59 %S A112695 1,2,5,0,3,6,14,1,17,4,12,7,7,15,15,2,10,18,18,5,5,13,13,8,21,8,109, %T A112695 16,16,16,104,3,24,11,11,19,19,19,32,6,107,6,27,14,14,14,102,9,22,22, %U A112695 22,9,9,110,110,17,30,17,30,17,17,105,105,4,25,25,25,12,12,12 %N A112695 Number of steps needed to reach 4,2,1 in Collatz' 3*n+1 conjecture. %C A112695 a(n) = number of iterations of the Collatz 3*x+1 map applied to n until the conjectured 4,2,1 sequence is reached. %D A112695 C. A. Pickover, Dr. Googols wundersame Welt der Zahlen, Deutscher Taschenbuch Verlag, Kap. 14, pp. 87, 193. German translation of: Wonders of numbers - Adventures in Mathematics, Mind and Meaning, Oxford University Press 2003. %H A112695 Ken Conrow, <a href="https://web.archive.org/web/20170829042515/http://www-personal.ksu.edu:80/~kconrow/">Collatz 3n+1 Problem.</a> %H A112695 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CollatzProblem.html">Collatz Problem</a> %H A112695 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %F A112695 a(n) = A006577(n) - 2, n >= 3, a(1)=1, a(2)=2. %e A112695 a(1)=1 because the sequence for n=1 is 1,4,2,1. %e A112695 a(4)=0 from 4,2,1. %e A112695 a(7)=14 from 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1. %t A112695 f[n_] := If[EvenQ[n], n/2, 3 n + 1]; %t A112695 a[n_] := Length[NestWhileList[f, n, {#1, #2, #3} != {4, 2, 1}&, 3]] - 3; %t A112695 Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Aug 08 2022 *) %Y A112695 Essentially the same sequence as A139399. %Y A112695 Cf. A006370, A006577. %K A112695 nonn,easy %O A112695 1,2 %A A112695 _Wolfdieter Lang_, Oct 31 2005