login
2-multiplicative persistence: number of iterations of "multiply 2nd powers of digits" needed to reach 0 or 1.
4

%I #30 Nov 12 2022 02:10:12

%S 0,7,6,6,3,5,5,4,5,1,1,7,6,6,3,5,5,4,5,1,7,6,5,4,2,4,5,3,4,1,6,5,5,4,

%T 3,4,4,3,4,1,6,4,4,3,2,3,3,2,4,1,3,2,3,2,3,2,3,2,2,1,5,4,4,3,2,4,5,2,

%U 4,1,5,5,4,3,3,5,2,5,4,1,4,3,3,2,2,2,5,2,3,1,5,4,4,4,2,4,4,3,3

%N 2-multiplicative persistence: number of iterations of "multiply 2nd powers of digits" needed to reach 0 or 1.

%C From _Mohammed Yaseen_, Nov 08 2022: (Start)

%C Is 7 the maximal 2-multiplicative persistence?

%C Are A199986 the only numbers whose 2-multiplicative persistence is 7?

%C These hold true for n up to 10^9. (End)

%D 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.

%H Seiichi Manyama, <a href="/A031348/b031348.txt">Table of n, a(n) for n = 1..10000</a>

%H M. R. Diamond, <a href="http://www.markdiamond.com.au/download/joous-3-1-1.pdf">Multiplicative persistence base 10: some new null results</a>.

%H N. J. A. Sloane, <a href="http://neilsloane.com/doc/persistence.html">The persistence of a number</a>, J. Recreational Math., 6 (1973), 97-98.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/MultiplicativePersistence.html">Multiplicative Persistence</a>

%e a(14) = 6 because

%e 14 -> 1^2 * 4^2 = 16;

%e 16 -> 1^2 * 6^2 = 36;

%e 36 -> 3^2 * 6^2 = 324;

%e 324 -> 3^2 * 2^2 * 4^2 = 576;

%e 576 -> 5^2 * 7^2 * 6^2 = 44100;

%e 44100 -> 0 => the trajectory is 14 -> 16 -> 36 -> 324 -> 576 -> 44100 -> 0 with 6 iterations. - _Michel Lagneau_, May 22 2013

%t m2pd[n_]:=Length[NestWhileList[Times@@(IntegerDigits[#]^2)&,n,#>1&]]-1; Array[m2pd,100] (* _Harvey P. Dale_, Apr 19 2020 *)

%o (PARI) f(n) = my(d=digits(n)); prod(k=1, #d, d[k]^2);

%o a(n) = if (n==1, 0, my(nb=1); while(((new = f(n)) > 1), n = new; nb++); nb); \\ _Michel Marcus_, Jun 13 2018

%o (Python)

%o from math import prod

%o from itertools import count, islice

%o def f(n): return prod(map(lambda x: x*x, map(int, str(n))))

%o def a(n):

%o c = 0

%o while n not in {0, 1}: n, c = f(n), c+1

%o return c

%o print([a(n) for n in range(1, 100)]) # _Michael S. Branicky_, Oct 13 2022

%Y Cf. A031346.

%K nonn,base

%O 1,2

%A _Eric W. Weisstein_