login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A118138 Sum of factorials of prime factors, with multiplicity. 1
2, 6, 4, 120, 8, 5040, 6, 12, 122, 39916800, 10, 6227020800, 5042, 126, 8, 355687428096000, 14, 121645100408832000, 124, 5046, 39916802, 25852016738884976640000, 12, 240, 6227020802, 18, 5044 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
For primes p, a(p) = p!. For powers of primes a(p^k) = k*(p!). For nonsquare semiprimes A006881 = pq, we have a(pq)= p! + q!. For sphenic numbers A007304 = p * q * r we have a(pqr) = p! + q! + r!. See also A008472 the sum of the distinct primes dividing n.
LINKS
Eric Weisstein's World of Mathematics, Factorial Sums.
FORMULA
a(n) = SUM[p|n] p!. a(n) = SUM[i=1..k] e_i * (p_i)! where n = (p_1^e_1)*(p_2^e_2)*...*(p_k^e_k).
EXAMPLE
a(6) = 8 because 6 = 2 * 3 and 2! + 3! = 8.
a(12) = 10 because 12 = 2^2 * 3 and 2! + 2! + 3! = 10.
a(30) = 128 because 30 = 2 * 3 * 5 and 2! + 3! + 5! = 128.
MATHEMATICA
Table[Total[Flatten[PadRight[{}, Last[#], First[#]]&/@FactorInteger[ n]]!], {n, 30}] (* Harvey P. Dale, Jan 06 2012 *)
PROG
(PARI) a(n)=my(f=factor(n)); sum(i=1, #f~, f[i, 1]!*f[i, 2]) \\ Charles R Greathouse IV, Sep 14 2015
CROSSREFS
Sequence in context: A022404 A210420 A306585 * A240023 A004583 A348720
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, May 13 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 06:08 EDT 2024. Contains 371767 sequences. (Running on oeis4.)