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 A274472 #27 Jan 11 2017 11:50:28 %S A274472 2,0,0,1,0,1,0,2,3,1,0,2,0,1,2,3,0,4,0,2,6,1,0,3,3,1,2,2,0,3,0,4,6,1, %T A274472 2,5,0,1,2,3,0,7,0,2,4,1,0,4,3,4,6,2,0,3,2,3,3,1,0,4,0,1,17,5,6,7,0,2, %U A274472 5,3,0,6,0,1,2,2,4,3,0,4,3,1,0,8,8,1,2 %N A274472 Number of iterations of the Collatz recursion required to reach a prime number. %C A274472 If n is prime then a(n)=0. If n is composite then a(n)=A280929(n). - _Dmitry Kamenetsky_, Jan 11 2017 %H A274472 Seiichi Manyama, <a href="/A274472/b274472.txt">Table of n, a(n) for n = 1..10000</a> %H A274472 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %t A274472 Table[Length@ NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, ! PrimeQ@ # &] - 1, {n, 120}] (* _Michael De Vlieger_, Jun 26 2016 *) %o A274472 (PARI) a(n) = my(i=0, k=n); while(!ispseudoprime(k), if(k%2==0, k=k/2, k=3*k+1); i++); i %o A274472 for(n=1, 87, print1(a(n), ", ")) \\ _Felix Fröhlich_, Jun 24 2016 %Y A274472 Cf. A000040, A006877, A280929. %K A274472 nonn %O A274472 1,1 %A A274472 _Matthew Campbell_, Jun 24 2016 %E A274472 More terms from _Felix Fröhlich_, Jun 24 2016