%I #7 Mar 11 2014 01:32:45
%S 1,2,3,4,5,9,7,16,27,32,11,512,13,128,243,65536,17,134217728,19,
%T 4294967296,2187,2048,23
%N Write down the primes dividing n (with repetition) in an exponent tower (see comment). a(n) = the largest possible value of such a tower.
%C Clarification of definition: If p^j = the largest power of the prime p to divide n, then write down the prime p a total of j times. Do this for all primes dividing n. Next, take a permutation q = (q(1), q(2),...q(r)) (r = sum of the exponents in the prime-factorization of n) of all these primes, and write them in a exponent tower like this: q(1)^(q(2)^(q(3)^(...^q(r)))). a(n) = the largest possible value of this tower, considering all permutations q.
%C a(24) = 2^(2^(3^2)) is 155 digits and too long to display.
%e The primes dividing 12 are (with repetition): 2, 2, 3. There are three distinct exponent towers that can be constructed with these primes: 2^(2^3) = 256, 2^(3^2) = 512, and 3^(2^2) = 81. a(12) = the largest of these, which is 512.
%Y Cf. A164339.
%K nonn
%O 1,2
%A _Leroy Quet_, Aug 13 2009
%E Extended by _Ray Chandler_, Mar 16 2010