A126232 Number of functions f:{1,2,...,n}->{1,2,...,n} such that Im(f) contains 5 fixed elements.
120, 2520, 52080, 1164240, 28594440, 771309000, 22746757440, 729419296320, 25295774463960, 943934414262840, 37728367833920400, 1608541146018621360, 72881990543360522280, 3497670707401587171240, 177254235519701336515680
Offset: 5
Keywords
Examples
a(10)=771309000.
Links
- Milan Janjic, Enumerative Formulas for Some Functions on Finite Sets
Programs
-
Maple
a(n):n->n^n-5*(n-1)^n+10*(n-2)^n-10*(n-3)^n+5*(n-4)^n-(n-5)^n;
-
Mathematica
Drop[Table[Sum[(-1)^k Binomial[5,k] (n-k)^n,{k,0,5}],{n,1,20}],4] (* Geoffrey Critzer, Dec 23 2012 *)
Formula
a(n)=n^n-5*(n-1)^n+10*(n-2)^n-10*(n-3)^n+5*(n-4)^n-(n-5)^n.