A345902 a(0) = 1; for n >= 1, a(n) = A004185(a(n-1)*n).
1, 1, 2, 6, 24, 12, 27, 189, 1125, 1125, 1125, 12357, 124488, 1134468, 12255588, 12333888, 12234789, 11234799, 22222368, 222224499, 444448899, 2333467899, 12333567789, 12234567789, 222336666999, 1445555667789, 12334444556778, 33333336, 33333489, 111666789
Offset: 0
Examples
a(4) = A004185(4*6) = 24; a(5) = A004185(5*24) = 12; a(6) = A004185(6*12) = 27.
Programs
-
PARI
f(n) = fromdigits(vecsort(digits(n))); \\ A004185 a(n) = if (n, f(a(n-1)*n), 1); \\ Michel Marcus, Jun 30 2021
-
Python
def A004185(n): return 0 if n == 0 else int("".join(sorted(str(n))).strip('0')) def aupton(nn): alst = [1] for n in range(1, nn+1): alst.append(A004185(alst[-1]*n)) return alst print(aupton(29)) # Michael S. Branicky, Jun 29 2021
Comments