A385930 Minimum base in which n achieves its maximum multiplicative persistence.
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
Keywords
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.
Links
- Brendan Gimby, Table of n, a(n) for n = 1..10000
- Brendan Gimby, Tools for finding numbers with large persistence.
- Tim Lamont-Smith, Multiplicative Persistence and Absolute Multiplicative Persistence, J. Int. Seq., Vol. 24 (2021), Article 21.6.7.
- N. J. A. Sloane, The persistence of a number, J. Recreational Math., 6 (1973), 97-98.
- Eric Weisstein's World of Mathematics, Multiplicative Persistence.
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)])
Comments