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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A090672 a(n) = (n^2-1)*n!/3. 7
0, 2, 16, 120, 960, 8400, 80640, 846720, 9676800, 119750400, 1596672000, 22832409600, 348713164800, 5666588928000, 97639686144000, 1778437140480000, 34145993097216000, 689322235650048000, 14597412049059840000, 323575967087493120000, 7493338185184051200000 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

a(n) = Sum_{pi in Symm(n)} Sum_{i=1..n} |pi(i)-i|, i.e., the total displacement of all letters in all permutations on n letters.

a(n) = number of entries between the entries 1 and 2 in all permutations of {1,2,...,n+1}. Example: a(2)=2 because we have 123, 1(3)2, 213, 2(3)1, 312, 321; the entries between 1 and 2 are surrounded by parentheses. - Emeric Deutsch, Apr 06 2008

a(n) = Sum_{k=0..n-1} k*A138770(n+1,k). - Emeric Deutsch, Apr 06 2008

a(n) is also the number of peaks in all permutations of {1,2,...,n+1}. Example: a(3)=16 because the permutations 1234, 4123, 3124, 4312, 2134, 4213, 3214, and 4321 have no peaks and each of the remaining 16 permutations of {1,2,3,4} has exactly one peak. - Emeric Deutsch, Jul 26 2009

REFERENCES

D. Daly and P. Vojtechovsky, Displacement of permutations, preprint, 2003.

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..300

FORMULA

a(n) = A052571(n+2)/3 = 2*A005990(n). - Zerinvary Lajos, May 11 2007

a(n) = (n+3)! * Sum_{k=1..n} (k+1)!/(k+3)!, with offset 0. - Gary Detlefs, Aug 05 2010

E.g.f.: (x^3 - 3*x^2)/(3*(x-1)^3). - Geoffrey Critzer, Mar 04 2013

MAPLE

a:=n->sum(sum(sum(n!/3, j=1..n), k=-1..n), m=0..n): seq(a(n), n=0..20); # Zerinvary Lajos, May 11 2007

MATHEMATICA

nn=20; Drop[Range[0, nn]!CoefficientList[Series[ x^3/3/(1-x)^2, {x, 0, nn}], x], 2]  (* Geoffrey Critzer, Mar 04 2013 *)

PROG

(MAGMA) [(n^2-1)*Factorial(n)/3: n in [1..25]]; // Vincenzo Librandi, Oct 11 2011

CROSSREFS

Twice A005990.

Cf. A138770.

Sequence in context: A026129 A026158 A025185 * A200820 A209361 A229808

Adjacent sequences:  A090669 A090670 A090671 * A090673 A090674 A090675

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, Dec 18 2003

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 18 07:39 EDT 2020. Contains 337166 sequences. (Running on oeis4.)