%I #15 Aug 13 2017 02:30:48
%S 22,333,22222222,55555,333333222222,7777777,222222222222222222222222,
%T 333333333333333333,55555555552222222222,0,
%U 333333333333222222222222222222222222,0,7777777777777722222222222222
%N a(n) is the largest number whose product of decimal digits equals n^n.
%C No digit=1 is permitted to avoid infinite number of solutions; a(n)=0 if A067734(n^n)=0.
%H Chai Wah Wu, <a href="/A068186/b068186.txt">Table of n, a(n) for n = 2..100</a>
%F a(n) is obtained as prime factors of n^n concatenated in order of magnitude and with repetitions; a(n)=0 if n has p > 7 prime factors.
%e n=10, 10^10=10000000000, a(5)=55555555552222222222.
%o (Python)
%o from sympy import factorint
%o def A068186(n):
%o if n == 1:
%o return 1
%o pf = factorint(n)
%o ps = sorted(pf.keys(),reverse=True)
%o if ps[0] > 7:
%o return 0
%o s = ''
%o for p in ps:
%o s += str(p)*(n*pf[p])
%o return int(s) # _Chai Wah Wu_, Aug 12 2017
%Y Cf. A000312, A001222, A002473, A067734, A068183-A068187, A068189-A068191.
%K base,nonn
%O 2,1
%A _Labos Elemer_, Feb 19 2002
%E a(12) corrected by _Chai Wah Wu_, Aug 12 2017