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.

A385930 Minimum base in which n achieves its maximum multiplicative persistence.

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 2, 3, 2, 4, 4, 2, 5, 4, 4, 6, 3, 5, 5, 6, 6, 5, 6, 5, 3, 3, 7, 6, 6, 4, 8, 6, 6, 6, 9, 8, 8, 4, 7, 7, 7, 9, 11, 8, 7, 7, 7, 5, 10, 9, 9, 9, 3, 8, 8, 12, 10, 9, 6, 8, 9, 8, 4, 6, 6, 10, 12, 9, 9, 6, 3, 13, 5, 10, 11, 7, 10, 9, 3, 14, 14, 7
Offset: 1

Views

Author

Brendan Gimby, Jul 12 2025

Keywords

Comments

a(n) is the smallest base in which n has multiplicative persistence A245760(n).

Examples

			8 written in base 3 goes 22 -> 11 -> 1, so 8 has persistence 2 in base 3. Since 8 has lower persistence in all smaller bases and no larger persistence in any higher bases, a(8)=3.
In all bases, 12 has persistence 1 or zero. In base 2, 12 goes 1100 -> 0 where it has persistence 1. Thus a(12)=2.
		

Crossrefs

Programs

  • Mathematica
    mp[n_, b_] := Module[{c = 0, cur = n},While[cur >= b, cur = Times @@ IntegerDigits[cur, b]; c++  ]; c ];
    a[n_] := Module[{bases, persist},bases = Range[2, Max[3, n] - 1];persist = mp[n, #] & /@ bases;If[persist == {}, 2, bases[[Position[persist, Max[persist]][[1, 1]]]]]  ];
    Array[a,82] (* James C. McMahon, Jul 17 2025 *)
  • Python
    from math import prod
    from sympy.ntheory.digits import digits
    def mp(n, b): # multiplicative persistence of n in base b [from Michael S. Branicky in A330152]
        c = 0
        while n >= b:
            n, c = prod(digits(n, b)[1:]), c+1
        return c
    def a(n):
        ps = list((mp(n, b) for b in range(2, max(3, n))))
        return ps.index(max(ps)) + 2
    print([a(n) for n in range(1, 60)])