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!)
A305730 a(n) is the total displacement of all letters in all permutations of n letters with no fixed points. 2
0, 0, 2, 8, 60, 440, 3710, 34608, 355992, 4004880, 48948570, 646121080, 9163171732, 138974771208, 2244977073430, 38485321258720, 697867158824880, 13346709412525728, 268504389357870642, 5668425997555046760, 125302048367006296940, 2894477317277845459160 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) = n * (n+1) * A000166(n)/3 = 2/3 * A065087(n).
a(n) = n * (n+1)!/3 * Sum_{k=0..n} (-1)^k/k!.
a(n) = n * (n+1) * (a(n-1)/(n-1) + (-1)^n/3) for n > 1.
a(n) = 2 * A000313(n+2). - Alois P. Heinz, Jun 22 2018
E.g.f.: exp(-x)*x^2*(3 - 2*x + x^2)/(3*(1 - x)^3). - Ilya Gutkovskiy, Jun 25 2018
EXAMPLE
n | 1 2 3 4 | the displacement of all letters | a(n)
--+---------+---------------------------------+------
2 | 2 1 | 1 + 1 = 2 | 2
3 | 2 3 1 | 1 + 1 + 2 = 4 | 8
| 3 1 2 | 2 + 1 + 1 = 4 |
4 | 2 1 4 3 | 1 + 1 + 1 + 1 = 4 | 60
| 2 3 4 1 | 1 + 1 + 1 + 3 = 6 |
| 2 4 1 3 | 1 + 2 + 2 + 1 = 6 |
| 3 1 4 2 | 2 + 1 + 1 + 2 = 6 |
| 3 4 1 2 | 2 + 2 + 2 + 2 = 8 |
| 3 4 2 1 | 2 + 2 + 1 + 3 = 8 |
| 4 1 2 3 | 3 + 1 + 1 + 1 = 6 |
| 4 3 1 2 | 3 + 1 + 2 + 2 = 8 |
| 4 3 2 1 | 3 + 1 + 1 + 3 = 8 |
PROG
(PARI) {a(n) = n*(n+1)!/3*sum(k=0, n, (-1)^k/k!)}
CROSSREFS
Sequence in context: A196076 A027278 A001415 * A364077 A053871 A364395
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jun 22 2018
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 April 24 09:18 EDT 2024. Contains 371935 sequences. (Running on oeis4.)