login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A111874 The work performed by a partial function f:{1,...,n}->{1,...,n} is defined to be work(f)=sum(|i-f(i)|,i in dom(f)); a(n) is equal to sum(work(f)) where the sum is over all injective partial functions f:{1,...,n}->{1,...,n}. 3
0, 4, 56, 680, 8360, 108220, 1492624, 21994896, 346014960, 5798797620, 103251381640, 1947864594104, 38827482815576, 815655120856940, 18013584786712480, 417284952377904160, 10117859730525070944 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
((n^3-n)/3)*sum(i=0...n-1, (n-1 choose i)^2*i!)
EXAMPLE
When n=2 there are 7 injective partial maps {1,2}->{1,2}. these are (1 2), (2 1), (1 -), (2 -), (- 1), (- 2) (- -). Adding up the work performed by these maps (from left to right as arranged above) gives a(2)=0+2+0+1+1+0+0=4.
MATHEMATICA
f[n_] := (n^3 - n)Sum[Binomial[n - 1, k]^2*k!, {k, 0, n - 1}]/3; Array[f, 17] (* Robert G. Wilson v *)
CROSSREFS
Sequence in context: A333294 A130219 A222687 * A297944 A298555 A240298
KEYWORD
easy,nonn
AUTHOR
James East, Nov 23 2005
EXTENSIONS
More terms from Robert G. Wilson v, Nov 26 2005
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 6 05:18 EDT 2024. Contains 374030 sequences. (Running on oeis4.)