login
A126778
Number of functions f:{1,2,...,n}->{1,2,...,n} such that Im(f) contain two fixed elements.
2
2, 12, 110, 1320, 19502, 341796, 6927230, 159338640, 4100173022, 116692730220, 3639243694814, 123411407978040, 4521172518708302, 177943592279325684, 7487880700093141502, 335470576863324471840, 15942605654030732807102, 801021400634789561255868
OFFSET
2,1
FORMULA
a(n)=n^n-2*(n-1)^n+(n-2)^n (n=2,3,...)
MAPLE
a:=n->n^n-2*(n-1)^n+(n-2)^n;
MATHEMATICA
Drop[Table[Sum[(-1)^k Binomial[2, k] (n-k)^n, {k, 0, 2}], {n, 1, 20}], 1] (* Geoffrey Critzer, Dec 23 2012 *)
CROSSREFS
Sequence in context: A217800 A241958 A217802 * A158832 A372158 A264916
KEYWORD
nonn
AUTHOR
Aleksandar M. Janjic and Milan Janjic, Feb 18 2007
EXTENSIONS
Entries checked by N. J. A. Sloane, Mar 08 2007
STATUS
approved