login
Product of nonzero digits of n! (A000142).
2

%I #16 Dec 15 2017 17:35:49

%S 1,1,2,6,8,2,14,20,24,2304,2304,11664,1512,2688,112896,508032,

%T 18579456,87091200,11854080,368640,6967296,22861440,542126592,

%U 1872809164800,40633270272,559872000,26873856000,8561413324800,178362777600

%N Product of nonzero digits of n! (A000142).

%H Harry J. Smith, <a href="/A067067/b067067.txt">Table of n, a(n) for n = 0..200</a>

%e a(10) = 2304 as 10! = 3628800 and 3*6*2*8*8 = 2304.

%t f[n_] := Block[{d = Sort[ IntegerDigits[n! ]] }, While[ First[d] == 0, d = Drop[d, 1]]; Return[ Apply[ Times, d]]]; Table[ f[n], {n, 0, 30} ]

%t Table[Times@@DeleteCases[IntegerDigits[n!],0],{n,0,30}] (* _Harvey P. Dale_, Jan 11 2016 *)

%o (PARI) ProdNzD(x)= { local(d, p=1); while (x>9, d=x%10; if (d, p*=d); x\=10); return(p*x) } { for (n=0, 200, write("b067067.txt", n, " ", ProdNzD(n!)) ) } \\ _Harry J. Smith_, May 03 2010

%Y Cf. A000142.

%K base,nonn

%O 0,3

%A _Amarnath Murthy_, Jan 03 2002

%E More terms from _Jason Earls_, _Harvey P. Dale_ and _Robert G. Wilson v_, Jan 04 2002