A126779 Number of functions f:{1,2,...,n}->{1,2,...,n} such that Im(f) contains 3 fixed elements.
6, 60, 750, 11340, 201726, 4131036, 95750430, 2478397020, 70864914846, 2218385781612, 75463626886830, 2771883228523500, 109340261175108606, 4609962410815813308, 206883575626027168830, 9846362287666897852860
Offset: 3
Keywords
Examples
a(7)=201726
Links
- Robert Israel, Table of n, a(n) for n = 3..386
- Milan Janjic, Enumerative Formulas for Some Functions on Finite Sets
Programs
-
Maple
a:=n->n^n-3*(n-1)^n+3*(n-2)^n-(n-3)^n;
-
Mathematica
Drop[Table[Sum[(-1)^k Binomial[3,k] (n-k)^n,{k,0,3}],{n,1,20}],2] (* Geoffrey Critzer, Dec 23 2012 *)
Formula
a(n) = n^n-3*(n-1)^n+3*(n-2)^n-(n-3)^n, (n=3,4,...)
E.g.f.: (W(-x)^3 + 3*x*W(-x)^2 + 3*x^2*W(-x) + x^3)/(W(-x)^3*(1 + W(-x))) where W is the Lambert W function. - Robert Israel, Jan 10 2019