OFFSET
0,6
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..10080
M. R. Diamond and D. D. Reidpath, A counterexample to conjectures by Sloane and Erdos concerning the persistence of numbers, Journal of Recreational Mathematics 29:2 (1998), pp. 89-92.
MATHEMATICA
(* For the definition of the factorial base version of IntegerDigits, see A007623 *) Table[Times@@factBaseIntDs[n], {n, 0, 99}] (* Alonso del Arte, Feb 28 2012 *)
PROG
(PARI) a(n)=my(k=1, s=1); while(n, s*=n%k++; n\=k); s
(Python)
from operator import mul
def A(n, p=2):
return n if n<p else A(n//p, p+1)*10 + n%p
def a(n):
x=str(A(n - 1))
return 0 if "0" in x else reduce(mul, [int(i) for i in x])
print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 19 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Charles R Greathouse IV, Feb 28 2012
STATUS
approved