A126780 Number of functions f:{1,2,...,n}->{1,2,...,n} such that Im(f) contains 4 fixed elements.
24, 360, 5880, 109200, 2298744, 54313560, 1425878520, 41215616640, 1301388272184, 44580423767880, 1647012735721080, 65286028105225200, 2764048499876532984, 124490422185142171320, 5943580498312544073720
Offset: 4
Keywords
Examples
a(7)=109200
Links
- Milan Janjic, Enumerative Formulas for Some Functions on Finite Sets
Programs
-
Maple
a:=n->n^n-4*(n-1)^n+6*(n-2)^n-4*(n-3)^n+(n-4)^n;
-
Mathematica
Drop[Table[Sum[(-1)^k Binomial[4,k] (n-k)^n,{k,0,4}],{n,1,20}],3] (* Geoffrey Critzer, Dec 23 2012 *)
Formula
a(n)=n^n-4*(n-1)^n+6*(n-2)^n-4*(n-3)^n+(n-4)^n, (n=4,5,...)