OFFSET
0,3
LINKS
Harry J. Smith and Indranil Ghosh, Table of n, a(n) for n = 0..10000 (first 1001 terms from Harry J. Smith)
Eric Weisstein's World of Mathematics, Factorial
FORMULA
If n=10*q+r, (0 <= r < 10) then a(n) = (q+1+r)!*Sum_{k=0..r} (-1)^(q-k)*binomial(r,k)/(q+1+r-k). - Milan Janjic, Dec 14 2008
EXAMPLE
a(24) = (2!) * (4!) = 2 * 24 = 48.
MAPLE
A066459 := proc(n)
local a, d;
a := 1 ;
for d in convert(n, base, 10) do
a := a*d! ;
end do:
a ;
end proc: # R. J. Mathar, Aug 07 2014
MATHEMATICA
Table[Times@@(IntegerDigits[n]!), {n, 0, 50}] (* Harvey P. Dale, Oct 20 2024 *)
PROG
(PARI) { for (n=0, 1000, m=n; a=1; while (m>0, d=m%10; m=(m-d)/10; a*=d!); write("b066459.txt", n, " ", a) ) } \\ Harry J. Smith, Feb 15 2010
(Haskell)
import Data.List (unfoldr)
a066459 = product . map a000142 .
unfoldr (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 10)
-- Reinhard Zumkeller, Oct 11 2011
(Python)
import math
def A066459(n):
s=1
for i in str(n):
s*=math.factorial(int(i))
return s # Indranil Ghosh, Jan 11 2017
CROSSREFS
KEYWORD
base,easy,nonn,changed
AUTHOR
Jason Earls, Jan 02 2002
STATUS
approved