login
Length of cycle reached when iterating the mapping x-> n*A035116(x) on 1.
1

%I #13 Nov 23 2021 11:27:11

%S 1,2,2,2,4,2,5,2,2,7,2,1,2,5,6,1,2,2,2,3,2,2,2,1,1,2,4,1,2,1,2,3,1,2,

%T 1,1,2,2,1,3,2,4,2,1,3,2,2,4,3,6,1,1,2,2,3,3,1,2,2,4,2,2,1,3,3,3,2,1,

%U 1,2,2,1,2,2,1,1,1,3,2,8,1,2,2,3,3,2,1,3,2,3,1,1,1,2,3,1,2,4,1,2

%N Length of cycle reached when iterating the mapping x-> n*A035116(x) on 1.

%C The terms 1-25 all appear below 10^8; the last of these are a(12545280) = 21, a(12684672) = 24, and a(96940800) = 25. - _Charles R Greathouse IV_, Nov 23 2021

%H Charles R Greathouse IV, <a href="/A349483/b349483.txt">Table of n, a(n) for n = 1..10000</a>

%e For n = 2, 1 --> 2 --> 8 --> 32 --> 72 --> 288 --> 648 --> 800 --> 648. The cycle reached has just two terms: 648 and 800. Therefore, a(2) = 2.

%t a[n_] := Module[{s = NestWhileList[n*DivisorSigma[0, #]^2 &, 1, UnsameQ, All]}, Differences[Position[s, s[[-1]]]][[1, 1]]]; Array[a, 100] (* _Amiram Eldar_, Nov 19 2021 *)

%o (PARI) brent(f,x)=my(pow=1,lam=1,tortoise=x,hare=f(x)); while(tortoise!=hare, if(pow==lam, tortoise=hare; pow<<=1; lam=0); hare=f(hare); lam++); lam

%o a(n)=brent(k->n*numdiv(k)^2,1) \\ _Charles R Greathouse IV_, Nov 19 2021

%Y Cf. A035116.

%Y Similar sequences: A349410.

%K nonn

%O 1,2

%A _Tejo Vrush_, Nov 19 2021