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!)
A086684 a(n) = n! - Sum_{i} p_i!^e_i, where n = Product_{i} (p_i^e_i). 0

%I #12 Jan 07 2021 04:54:00

%S 1,0,0,20,0,712,0,40312,362844,3628678,0,479001590,0,87178286158,

%T 1307674367874,20922789887984,0,6402373705727962,0,

%U 2432902008176639876,51090942171709434954,1124000727777567763198,0,620448401733239439359986

%N a(n) = n! - Sum_{i} p_i!^e_i, where n = Product_{i} (p_i^e_i).

%C a(p) = 0 iff p is prime.

%F a(n) = n! - A118138(n). - _R. J. Mathar_, Sep 15 2012

%e a(6) = 6! - 2! - 3! = 720 - 2 - 6 = 712.

%t g[n_] := Plus @@ Flatten[Table[ # [[1]]! ^ # [[2]], {1}] & /@ FactorInteger[n]]; Table[n! - f[n], {n, 1, 24}]

%o (PARI) for(i=1,20,f=factor(i); print1(","i!-sum(j=1,length(f[,1]),f[j,1]!^f[j,2])))

%Y Cf. A000142, A118138.

%K nonn

%O 1,4

%A _Jon Perry_, Jul 28 2003

%E Edited and extended by _Robert G. Wilson v_, Aug 16 2003

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 19 18:05 EDT 2024. Contains 371797 sequences. (Running on oeis4.)