login
A208575
Product of digits of n in factorial base.
12
0, 1, 0, 1, 0, 2, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, 0, 4, 0, 0, 0, 3, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, 0, 4, 0, 0, 0, 3, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 0, 0, 0, 4, 0, 8, 0, 0, 0, 6, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 6, 0, 0, 0, 6, 0, 12, 0, 0, 0, 9, 0, 18
OFFSET
0,6
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
KEYWORD
nonn,base
AUTHOR
STATUS
approved