A347668 Indices of records in A347409.
1, 2, 3, 15, 21, 75, 151, 1365, 5461, 7407, 14563, 87381, 184111, 932067, 5592405, 13256071, 26512143, 357913941, 1431655765, 3817748707, 22906492245, 91625968981, 244335917283, 1466015503701, 5212499568715, 10424999137431, 93824992236885
Offset: 1
Programs
-
Mathematica
A347409[n_]:=(c=n;sm=0;While[c>1,If[OddQ[c],c=3c+1,If[(s=IntegerExponent[c,2])>sm,sm=s];c/=2^s]];sm) upto=100000;a={};rec=-1;Do[If[(r=A347409[i])>rec,rec=r;AppendTo[a,i]],{i,upto}];a
-
PARI
f(n)=my(nb=0); while (n != 1, if (n % 2, n=3*n+1, my(x = valuation(n, 2)); n /= 2^x; nb = max(nb, x)); ); nb; \\ A347409 lista(nn) = my(r=-1, m); for (n=1, nn, if ((m=f(n)) > r, print1(n, ", "); r = m);); \\ Michel Marcus, Sep 10 2021
Extensions
a(15) from Michel Marcus, Sep 10 2021
a(16)-a(17) from Alois P. Heinz, Sep 10 2021
a(18)-a(20) from Michael S. Branicky, Sep 28 2021
a(21)-a(22) from Michael S. Branicky, Sep 30 2021
a(23) from Michael S. Branicky, Oct 04 2021
a(24)-a(27) from Kevin P. Thompson, Apr 14 2022
Comments