OFFSET
1,1
LINKS
MATHEMATICA
s[n_]:=s[n]=(i=0; r=n; While[r!=1, i++; If[EvenQ@r, r=r/2, r=r*3+1]]; i);
lst={}; max=1; Do[If[!PrimeQ@k, t=s[k]; If[t>max, AppendTo[lst, k]; max=t]], {k, 10^4}]; lst (* Giorgos Kalogeropoulos, Jul 28 2021 *)
PROG
(PARI) a6577(n0)={my(n=n0, k=0); while(n>1, k++; n=if(n%2, 3*n+1, n/2)); k};
a346591(limit)={msteps=0; forcomposite(c=4, limit, my(m=a6577(c)); if(m>msteps, print1(c, ", "); msteps=m))};
a346591(2000000)
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Jul 28 2021
STATUS
approved