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 A082538 #10 Jun 22 2025 21:32:20 %S A082538 1,1,1,2,2,3,4,6,7,10,12,15,20,26,33,44,55,69,88,113,141,179,226,284, %T A082538 358,453,571,724,913,1149,1456,1839,2323,2945,3718,4688,5933,7498, %U A082538 9476,11982,15126,19111,24172,30535,38563,48733,61560,77792,98313,124240 %N A082538 Number of numbers k which give 1 after applying exactly n iterations of the 3k+1 algorithm (if a number is even, divide it by 2; if it is odd, multiply by 3 and add 1). This total includes numbers k which also give 1 for a smaller number of iterations (i.e., for this sequence we do not assume the algorithm halts when 1 is reached). %D A082538 Gunther J. Wirsching, "The Dynamical System Generated by the 3n+1 Function" Lecture Notes in Mathematics (Springer Verlag, 1999), p. 1681 %H A082538 K. Conrow, <a href="http://www-personal.ksu.edu/~kconrow/problem.html">3n+1 Problem Statement</a>. %H A082538 Jeffrey C. Lagarias, <a href="http://www.cecm.sfu.ca/organics/papers/lagarias/index.html">The 3x+1 problem and its generalizations</a>, Amer. Math. Month1y v.92 (1985), pp. 3-23. %e A082538 a(3)=2 because both 1 and 8 lead to 1 in 3 steps (1->4->2->1 and 8->4->2->1). %o A082538 (Perl) %o A082538 #!/usr/bin/perl @old = ( 1 ); while (1) { print scalar(@old), " "; @new = ( ); foreach $n (@old) { if (($n % 6) == 4) { push(@new,($n-1)/3); } push(@new,$n+$n); } @old = @new; } sub numeric { return ($a <=> $b); } %K A082538 easy,nonn %O A082538 0,4 %A A082538 _Howard A. Landman_, May 23 2003