login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Composite numbers k such that A006577(k) sets a new record.
3

%I #12 Jul 28 2021 12:56:52

%S 4,6,9,18,25,27,54,108,129,171,231,327,649,703,871,1161,2223,2463,

%T 2919,3711,6171,10971,13255,17647,23529,26623,34239,35655,52527,77031,

%U 106239,142587,156159,216367,230631,410011,511935,626331,837799,1117065,1501353,1723519

%N Composite numbers k such that A006577(k) sets a new record.

%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>

%t s[n_]:=s[n]=(i=0;r=n;While[r!=1,i++;If[EvenQ@r,r=r/2,r=r*3+1]];i);

%t 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 *)

%o (PARI) a6577(n0)={my(n=n0,k=0);while(n>1,k++;n=if(n%2,3*n+1,n/2));k};

%o a346591(limit)={msteps=0;forcomposite(c=4,limit,my(m=a6577(c));if(m>msteps,print1(c,", ");msteps=m))};

%o a346591(2000000)

%Y Cf. A006577, A346592, A346593.

%Y A006877 is the union of A244638 and this sequence.

%K nonn

%O 1,1

%A _Hugo Pfoertner_, Jul 28 2021