cp's OEIS Frontend

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.

A066773 Smallest number which requires n^2 steps in the 3x+1 problem.

This page as a plain text file.
%I A066773 #18 Jun 03 2025 01:09:51
%S A066773 1,2,16,12,7,98,153,169,673,350,107,129,649,2110,4763,6919,6943,
%T A066773 158299,71310,724686,845223,665215,2157291,4468260,5978623,34385063,
%U A066773 21015006,301695657,489853918,568097511,418606034,1208474114
%N A066773 Smallest number which requires n^2 steps in the 3x+1 problem.
%C A066773 The next term is >= 1410123943. - Larry Reeves (larryr(AT)acm.org), Apr 10 2002
%H A066773 Jeffrey C. Lagarias, <a href="http://www.cecm.sfu.ca/organics/papers/lagarias/paper/html/paper.html">The 3x + 1 Problem and its Generalizations</a>
%H A066773 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CollatzProblem.html">Collatz Problem</a>
%H A066773 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%e A066773 a(3)=12 since the Collatz sequence is 12 -> 6 -> 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 and the count of steps is 9.
%t A066773 f[ n_ ] := Module[ {i = 0, m = n}, While[ m != 1, m = If[ OddQ[ m ], 3m + 1, m/2 ]; i++ ]; i ]; a = Table[ 0, {50} ]; Do[ m = Sqrt[ f[ n ] ]; If[ IntegerQ[ m ] && a[ [ m + 1 ] ] == 0, a[ [ m + 1 ] ] = n ], {n, 1, 10^6} ]; a
%o A066773 (PARI) {sequence(n)= c=0; k=n; while(k>1, if(k%2==0,k=k/2,k=3*k+1); c=c+1; ); if(issquare(c),print(n," ",c),); }
%Y A066773 Cf. A006577, A066905.
%K A066773 nonn
%O A066773 0,2
%A A066773 _Randall L Rathbun_, Jan 17 2002
%E A066773 Corrected and extended by _Dean Hickerson_ and _Robert G. Wilson v_, Jan 18 2002
%E A066773 More terms from Larry Reeves (larryr(AT)acm.org), Apr 10 2002