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.

A227153 Product of nonzero digits of n in factorial base.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 4, 3, 3, 3, 3, 6, 6, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 4, 3, 3, 3, 3, 6, 6, 2, 2, 2, 2, 4, 4, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 8, 8, 6, 6, 6, 6, 12, 12, 3, 3, 3, 3, 6, 6, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6
Offset: 0

Views

Author

Antti Karttunen, Jul 04 2013

Keywords

Comments

a(0) = 1 as an empty product always gives 1.

Crossrefs

A227157 gives the positions where equal with A208575.

Programs

  • Mathematica
    a[n_] := Module[{k = n, m = 2, r, p = 1}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, If[r > 0, p *= r]; m++]; p]; Array[a, 100, 0] (* Amiram Eldar, Feb 07 2024 *)
  • Python
    from functools import reduce
    from operator import mul
    def A(n, p=2):
        return n if n
  • Python
    def a(n, k=2): return max(n % k, 1) * a(n // k, k + 1) if n else 1 # David Radcliffe, May 22 2025

Formula

For all n, a(A227157(n)) = A208575(A227157(n)).