OFFSET
1,2
COMMENTS
From Mohammed Yaseen, Nov 08 2022: (Start)
Is 7 the maximal 2-multiplicative persistence?
Are A199986 the only numbers whose 2-multiplicative persistence is 7?
These hold true for n up to 10^9. (End)
REFERENCES
M. Gardner, Fractal Music, Hypercards and More Mathematical Recreations from Scientific American, Persistence of Numbers, pp. 120-1; 186-7, W. H. Freeman, NY, 1992.
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
M. R. Diamond, Multiplicative persistence base 10: some new null results.
N. J. A. Sloane, The persistence of a number, J. Recreational Math., 6 (1973), 97-98.
Eric Weisstein's World of Mathematics, Multiplicative Persistence
EXAMPLE
a(14) = 6 because
14 -> 1^2 * 4^2 = 16;
16 -> 1^2 * 6^2 = 36;
36 -> 3^2 * 6^2 = 324;
324 -> 3^2 * 2^2 * 4^2 = 576;
576 -> 5^2 * 7^2 * 6^2 = 44100;
44100 -> 0 => the trajectory is 14 -> 16 -> 36 -> 324 -> 576 -> 44100 -> 0 with 6 iterations. - Michel Lagneau, May 22 2013
MATHEMATICA
m2pd[n_]:=Length[NestWhileList[Times@@(IntegerDigits[#]^2)&, n, #>1&]]-1; Array[m2pd, 100] (* Harvey P. Dale, Apr 19 2020 *)
PROG
(PARI) f(n) = my(d=digits(n)); prod(k=1, #d, d[k]^2);
a(n) = if (n==1, 0, my(nb=1); while(((new = f(n)) > 1), n = new; nb++); nb); \\ Michel Marcus, Jun 13 2018
(Python)
from math import prod
from itertools import count, islice
def f(n): return prod(map(lambda x: x*x, map(int, str(n))))
def a(n):
c = 0
while n not in {0, 1}: n, c = f(n), c+1
return c
print([a(n) for n in range(1, 100)]) # Michael S. Branicky, Oct 13 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved