OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..5000
Eric Weisstein's World of Mathematics, Multiplicative Digital Root
MAPLE
mdr:= proc(n) option remember;
if n < 10 then return(n) fi;
procname(convert(convert(n, base, 10), `*`))
end proc:
select(mdr=4, [$1..10^5]); # Robert Israel, Oct 19 2015
MATHEMATICA
Select[Range@ 800, FixedPoint[Times @@ IntegerDigits@ # &, #] == 4 &] (* Michael De Vlieger, Oct 19 2015 *)
PROG
(PARI) t(n) = {while(n>9, n=prod(i=1, #n=digits(n), n[i])); n};
for(n=0, 1e4, if(t(n) == 4, print1(n", "))); \\ Altug Alkan, Oct 19 2015
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, Sep 15 1998
EXTENSIONS
Incorrect formula removed by Martin Renner, Oct 19 2015
STATUS
approved