|
|
A111873
|
|
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 partial functions f:{1,...,n}->{1,...,n}.
|
|
3
|
|
|
0, 6, 128, 2500, 51840, 1176490, 29360128, 803538792, 24000000000, 778122738030, 27243640258560, 1025115745389164, 41273168209215488, 1771037512207031250, 80704505322479288320, 3892895350053349478480, 198189314749641818898432
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
If n == -1 (mod 10^k) then 10^(n*k) divides a(n), so 10^9 divides a(9), 10^19 divides a(19),...,10^198 divides a(99), etc. - Farideh Firoozbakht, Nov 27 2005
|
|
LINKS
|
|
|
FORMULA
|
(n+1)^n*(n^2-n)/3
|
|
EXAMPLE
|
When n=2 there are 9 partial maps {1,2}->{1,2}: these are (1 1), (2 2), (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)=1+1+0+2+0+1+1+0+0=6.
|
|
MATHEMATICA
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|