cp's OEIS Frontend

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.

A345902 a(0) = 1; for n >= 1, a(n) = A004185(a(n-1)*n).

Original entry on oeis.org

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

Views

Author

Ctibor O. Zizka, Jun 29 2021

Keywords

Comments

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!.

Examples

			a(4) = A004185(4*6) = 24; a(5) = A004185(5*24) = 12; a(6) = A004185(6*12) = 27.
		

Crossrefs

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