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

%I #13 Sep 14 2015 10:24:21

%S 2,6,4,120,8,5040,6,12,122,39916800,10,6227020800,5042,126,8,

%T 355687428096000,14,121645100408832000,124,5046,39916802,

%U 25852016738884976640000,12,240,6227020802,18,5044

%N Sum of factorials of prime factors, with multiplicity.

%C 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.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/FactorialSums.html">Factorial Sums.</a>

%F 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).

%e a(6) = 8 because 6 = 2 * 3 and 2! + 3! = 8.

%e a(12) = 10 because 12 = 2^2 * 3 and 2! + 2! + 3! = 10.

%e a(30) = 128 because 30 = 2 * 3 * 5 and 2! + 3! + 5! = 128.

%t Table[Total[Flatten[PadRight[{},Last[#],First[#]]&/@FactorInteger[ n]]!],{n,30}] (* _Harvey P. Dale_, Jan 06 2012 *)

%o (PARI) a(n)=my(f=factor(n)); sum(i=1,#f~, f[i,1]!*f[i,2]) \\ _Charles R Greathouse IV_, Sep 14 2015

%Y Cf. A000040, A000142, A006881, A007304, A008472.

%K easy,nonn

%O 2,1

%A _Jonathan Vos Post_, May 13 2006

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)