Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #7 Jul 29 2017 17:17:51
%S 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 358,453,571,724,913,1149,1456,1839,2323,2945,3718,4688,5933,7498,
%U 9476,11982,15126,19111,24172,30535,38563,48733,61560,77792,98313,124240
%N 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 Gunther J. Wirsching, "The Dynamical System Generated by the 3n+1 Function" Lecture Notes in Mathematics (Springer Verlag, 1999), p. 1681
%H K. Conrow, <a href="http://www-personal.ksu.edu/~kconrow/problem.html">3n+1 Problem Statement</a>.
%H 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 a(3)=2 because both 1 and 8 lead to 1 in 3 steps (1->4->2->1 and 8->4->2->1).
%o #!/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 easy,nonn
%O 0,4
%A _Howard A. Landman_, May 23 2003