OFFSET
1,1
COMMENTS
All digits of a(n) must be odd. - Robert Israel, Oct 19 2015
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
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=5, [$1..10^5]); # Robert Israel, Oct 19 2015
MATHEMATICA
mrQ[n_]:=NestWhile[Times@@IntegerDigits[#]&, n, #>10&]==5; Select[Range[1395], mrQ[#]&] (* Jayanta Basu, May 30 2013 *)
PROG
(PARI) t(n) = {while(n>9, n=prod(i=1, #n=digits(n), n[i])); n};
for(n=0, 1e4, if(t(n) == 5, 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