# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a068186 Showing 1-1 of 1 %I A068186 #15 Aug 13 2017 02:30:48 %S A068186 22,333,22222222,55555,333333222222,7777777,222222222222222222222222, %T A068186 333333333333333333,55555555552222222222,0, %U A068186 333333333333222222222222222222222222,0,7777777777777722222222222222 %N A068186 a(n) is the largest number whose product of decimal digits equals n^n. %C A068186 No digit=1 is permitted to avoid infinite number of solutions; a(n)=0 if A067734(n^n)=0. %H A068186 Chai Wah Wu, Table of n, a(n) for n = 2..100 %F A068186 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 A068186 n=10, 10^10=10000000000, a(5)=55555555552222222222. %o A068186 (Python) %o A068186 from sympy import factorint %o A068186 def A068186(n): %o A068186 if n == 1: %o A068186 return 1 %o A068186 pf = factorint(n) %o A068186 ps = sorted(pf.keys(),reverse=True) %o A068186 if ps[0] > 7: %o A068186 return 0 %o A068186 s = '' %o A068186 for p in ps: %o A068186 s += str(p)*(n*pf[p]) %o A068186 return int(s) # _Chai Wah Wu_, Aug 12 2017 %Y A068186 Cf. A000312, A001222, A002473, A067734, A068183-A068187, A068189-A068191. %K A068186 base,nonn %O A068186 2,1 %A A068186 _Labos Elemer_, Feb 19 2002 %E A068186 a(12) corrected by _Chai Wah Wu_, Aug 12 2017 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE