This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A345902 #16 Jul 04 2021 16:08:12 %S A345902 1,1,2,6,24,12,27,189,1125,1125,1125,12357,124488,1134468,12255588, %T A345902 12333888,12234789,11234799,22222368,222224499,444448899,2333467899, %U A345902 12333567789,12234567789,222336666999,1445555667789,12334444556778,33333336,33333489,111666789 %N A345902 a(0) = 1; for n >= 1, a(n) = A004185(a(n-1)*n). %C A345902 Rearranging of digits of a(n-1)*n in ascending order gives in step n the smallest number possible. For n >= 5; the number of digits of a(n) < the number of digits of n!. %e A345902 a(4) = A004185(4*6) = 24; a(5) = A004185(5*24) = 12; a(6) = A004185(6*12) = 27. %o A345902 (Python) %o A345902 def A004185(n): %o A345902 return 0 if n == 0 else int("".join(sorted(str(n))).strip('0')) %o A345902 def aupton(nn): %o A345902 alst = [1] %o A345902 for n in range(1, nn+1): alst.append(A004185(alst[-1]*n)) %o A345902 return alst %o A345902 print(aupton(29)) # _Michael S. Branicky_, Jun 29 2021 %o A345902 (PARI) f(n) = fromdigits(vecsort(digits(n))); \\ A004185 %o A345902 a(n) = if (n, f(a(n-1)*n), 1); \\ _Michel Marcus_, Jun 30 2021 %Y A345902 Cf. A000142, A004185, A057615, A069638. %K A345902 nonn,base %O A345902 0,3 %A A345902 _Ctibor O. Zizka_, Jun 29 2021