OFFSET
5,1
COMMENTS
The persistence of a number is the number of times you need to multiply the digits together before reaching a single digit. a(3) and a(4) do not seem to exist.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 5..10000
M. R. Diamond and D. D. Reidpath, A counterexample to a conjecture of Sloane and Erdos, J. Recreational Math., 1998 29(2), 89-92.
Sascha Kurz, Persistence in different bases
T. Lamont-Smith, Multiplicative Persistence and Absolute Multiplicative Persistence, J. Int. Seq., Vol. 24 (2021), Article 21.6.7.
C. Rivera, Minimal prime with persistence p
N. J. A. Sloane, The persistence of a number, J. Recreational Math., 6 (1973), 97-98.
Eric Weisstein's World of Mathematics, Multiplicative Persistence
FORMULA
a(n) = 5*n-floor(n/24) for n > 23.
EXAMPLE
a(6) = 172 because 172 = [444]->[144]->[24]->[12]->[2] and no lesser n has persistence 4 in base 6.
MATHEMATICA
With[{m = 4, r = 24}, Table[Block[{k = 1}, While[Length@ FixedPointList[Times @@ IntegerDigits[#, n] &, k] != m + 2, k++]; k], {n, m + 1, r}]~Join~Array[(m + 1) # - Floor[#/r] &, 34, r + 1]] (* Michael De Vlieger, Aug 30 2021 *)
PROG
(PARI) pers(nn, b) = {ok = 0; p = 0; until (ok, d = digits(nn, b); if (#d == 1, ok = 1, p++); nn = prod(k=1, #d, d[k]); if (nn == 0, ok = 1); ); return (p); }
a(n) = {i=0; while (pers(i, n) != 4, i++); return (i); } \\ Michel Marcus, Jun 30 2013
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Sascha Kurz, Oct 09 2001
EXTENSIONS
Example modified by Harvey P. Dale, Oct 19 2022
STATUS
approved