cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A066459 Product of factorials of the digits of n.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 2, 2, 4, 12, 48, 240, 1440, 10080, 80640, 725760, 6, 6, 12, 36, 144, 720, 4320, 30240, 241920, 2177280, 24, 24, 48, 144, 576, 2880, 17280, 120960, 967680
Offset: 0

Views

Author

Jason Earls, Jan 02 2002

Keywords

Examples

			a(24) = (2!) * (4!) = 2 * 24 = 48.
		

Crossrefs

Cf. A000142, A034879 (iterated).

Programs

  • 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
    
  • 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 *)
  • 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
    
  • 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

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