OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Multiplicative Persistence
EXAMPLE
47 -> 4 * 7 -> [ 28 ] -> 2 * 8 -> [ 16 ] -> 1 * 6 -> [ 6 ] -> one digit in three steps.
MAPLE
filter:= proc(n) local L;
if not isprime(n) then return false fi;
L:= convert(convert(n, base, 10), `*`); if L < 10 then return false fi;
L:= convert(convert(L, base, 10), `*`); if L < 10 then return false fi;
L:= convert(convert(L, base, 10), `*`); evalb(L < 10)
end proc:
select(filter, [seq(i, i=11..1000, 2)]); # Robert Israel, Jun 05 2018
MATHEMATICA
pr3Q[n_] := Length[NestWhileList[Times @@ IntegerDigits[#] &, n, # > 9 &]] == 4; Select[Prime[Range[147]], pr3Q] (* Jayanta Basu, Jun 26 2013 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Sep 15 1998
STATUS
approved