A126781 Number of functions f:{1,2,...,n}->{1,2,...,n} such that Im(f) contains 6 fixed elements.
720, 20160, 514080, 13608000, 385363440, 11760819840, 386860668480, 13682898028800, 518666099711760, 20997894426949440, 904827327153291360, 41367795437773022400, 2000634709955550047280, 102066613831917982920960
Offset: 6
Keywords
Examples
a(7)=20160
Links
- Milan Janjic, Enumerative Formulas for Some Functions on Finite Sets
Crossrefs
Cf. A039621 (Lehmer-Comtet numbers of 2nd kind).
Programs
-
Maple
a:=n->n^n-6*(n-1)^n+15*(n-2)^n-20*(n-3)^n+15*(n-4)^n-6*(n-5)^n+(n-6)^n;
-
Mathematica
Drop[Table[Sum[(-1)^k Binomial[6,k] (n-k)^n,{k,0,6}],{n,1,20}],5] (* Geoffrey Critzer, Dec 23 2012 *)
Formula
a(n)=n^n-6*(n-1)^n+15*(n-2)^n-20*(n-3)^n+15*(n-4)^n-6*(n-5)^n+(n-6)^n, (n=6,7,...)