OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
For n=8, A002110(8) = 9699690 and the corresponding iteration chain is {9699690, 1658880, 442368, 147456, 49152, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1}. Its length is 20 and it has 15 terms that are powers of 2. Thus a(8) = 15.
MATHEMATICA
a[n_] := 1 + Max@ IntegerExponent[ FixedPointList[ EulerPhi, Times @@ Prime[Range[n]]], 2]; Array[a, 60] (* Giovanni Resta, May 30 2018 *)
PROG
(PARI) ispow2(n) = n >> valuation(n, 2) == 1;
a(n) = {my(p = vecprod(primes(n))); while(!ispow2(p), p = eulerphi(p)); valuation(p, 2) + 1; } \\ Amiram Eldar, Aug 17 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Feb 28 2000
STATUS
approved