The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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 James East The Work Performed by a Transformation Semigroup, preprint 2005. 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 Table[(n + 1)^n*(n^2 - n)/3, {n, 17}] (* Robert G. Wilson v *) CROSSREFS Cf. A111867, A111874, A111903. Sequence in context: A324093 A177756 A089314 * A348796 A012842 A012638 Adjacent sequences:  A111870 A111871 A111872 * A111874 A111875 A111876 KEYWORD easy,nonn AUTHOR James East, Nov 23 2005 EXTENSIONS More terms from Farideh Firoozbakht and Robert G. Wilson v, Nov 27 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 29 13:17 EST 2021. Contains 349416 sequences. (Running on oeis4.)