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 A213678 #14 Mar 06 2013 17:53:33 %S A213678 1,1,1,3,3,5,8,14,20,29,40,59,87,130,196,294,439,658,985,1459,2203, %T A213678 3328,5001,7482,11205,16805,25220,37850,56713,85108,127728,191635 %N A213678 Number of terms k such that difference between halving and tripling steps in Collatz (3x+1) trajectory of k is n. %e A213678 a(5) = 5 since there are only five numbers 12, 13, 20, 21, 32 such that difference between number of halving and tripling steps is 5. %t A213678 Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; nn = 15; t = Table[0, {nn}]; Do[c = Collatz[n]; e = Select[c, EvenQ]; diff = 2*Length[e] - Length[c]; If[diff < nn - 1, t[[diff + 2]]++], {n, 2^(nn - 1)}]; t (* _T. D. Noe_, Mar 04 2013 *) %Y A213678 Cf. A220071, A222599 (lists of numbers). %K A213678 nonn %O A213678 0,4 %A A213678 _Jayanta Basu_, Mar 04 2013 %E A213678 Corrected and extended by _T. D. Noe_, Mar 06 2013