OFFSET
1,2
COMMENTS
In these iteration chains, powers of 2 seem to be in the minority.
The sequence is not monotonic.
EXAMPLE
For n=10, the iteration chain of 43 terms is {6469693230, 5447823150, 4315810350, ..., 188416, 98304, 65536, 32768, ..., 4, 2, 1, 0} in which the largest power of 2 is 65536 = 2^16, so a(10)=16;
for n=11 the length is 61, including 54 numbers that are not powers of 2 and 7 powers of 2, of which the largest is 2^6 thus a(11)=6.
MATHEMATICA
a[n_] := Max@ IntegerExponent[ NestWhileList[# - EulerPhi[#] &, Times @@ Prime[Range[n]], # > 1 &], 2]; Array[a, 25] (* Giovanni Resta, May 30 2018 *)
PROG
(PARI) A051953(n)= { return(n-eulerphi(n)); } A002110(n)= { return(prod(i=1, n, prime(i))); } ispow2(n)= { local(nbin, nbinl, sd); nbin=binary(n); nbinl=matsize(nbin); sd=sum(i=1, nbinl[2], nbin[i]); if(sd==1, return(nbinl[2]-1), return(0); ); } A053148itr(n)= { local(v, vbin, maxp); v=A002110(n); maxp=ispow2(v); while(v>0, v=A051953(v); maxp=max(maxp, ispow2(v)); ); return(maxp); } { for(n=1, 70, print1(A053148itr(n), ", "); ); } \\ R. J. Mathar, May 19 2006
CROSSREFS
KEYWORD
more,nonn
AUTHOR
Labos Elemer, Feb 28 2000
EXTENSIONS
More terms from R. J. Mathar, May 19 2006
a(37)-a(46) from Giovanni Resta, May 31 2018
STATUS
approved