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.

Showing 1-2 of 2 results.

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)])

A385727 Minimum base in which the least number with absolute multiplicative persistence n achieves such persistence.

Original entry on oeis.org

0, 2, 3, 6, 9, 13, 17, 23, 26, 29, 41, 53, 53, 73, 123, 159, 157, 251, 332, 491, 587, 691, 943, 1187, 1187, 1804, 2923, 2348, 6241, 3541, 3541, 7082, 7082, 14164, 10623, 14164, 28328, 56656, 98533
Offset: 0

Views

Author

Brendan Gimby, Jul 08 2025

Keywords

Comments

a(n) is the minimum base in which the n-th term in A330152 achieves its absolute persistence.

Examples

			23 when represented in base 6 goes 35 -> 23 -> 10 -> 1, has absolute persistence of 3, and has smaller persistence in all smaller bases, so a(3) = 6 (Cf. A064867).
52 when represented in base 9 goes 57 -> 38 -> 26 -> 13 -> 3, has absolute persistence of 4, and has smaller persistence in all smaller bases, so a(4) = 9 (Cf. A064868).
		

Crossrefs

Programs

  • 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):
        k = 0
        while True:
            if b := next((b for b in range(2, max(3, k)) if mp(k, b)==n), 0): return b
            k += 1
    print([a(n) for n in range(11)])

Extensions

a(36)-a(38) from Jinyuan Wang, Jul 13 2025
Showing 1-2 of 2 results.