login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A077611 Number of adjacent pairs of form (odd,odd) among all permutations of {1,2,...,n}. 5
0, 0, 4, 12, 144, 720, 8640, 60480, 806400, 7257600, 108864000, 1197504000, 20118067200, 261534873600, 4881984307200, 73229764608000, 1506440871936000, 25609494822912000, 576213633515520000, 10948059036794880000, 267619220899430400000, 5620003638888038400000 (list; graph; refs; listen; history; internal format)
OFFSET

1,3

COMMENTS

a(n) is also the number of permutations of [n+1] starting and ending by an even number. [From Olivier Gerard, Nov 7 2011].

LINKS

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

FORMULA

a(n) = ceiling(n/2)*ceiling(n/2-1)*(n-1)!. Proof: There are ceiling(n/2) * ceiling(n/2-1) pairs (r, s) with r and s odd and distinct. For each pair, there are n-1 places it can occur in a permutation and (n-2)! possible arrangements of the other numbers.

a(n) = (n-1)!*(2*n*(n-1)-(2*n-1)*(-1)^n-1)/8. - Bruno Berselli, Nov 07 2011

EXAMPLE

For n=4, the a(4) = 12 permutations of degree 5 starting and ending by an even number are : 21354, 21534, 23154, 23514, 25134, 25314, 41352, 41532, 43152, 43512, 45132, 45312.

PROG

(MAGMA) [Factorial(n-1)*(2*n*(n-1)-(2*n-1)*(-1)^n-1)/8 : n in [1..30]]; // Vincenzo Librandi, Nov 16 2011

CROSSREFS

Cf. A052618, A077612, A077613.

Sequence in context: A002029 A204321 A152121 * A052598 A032071 A173603

Adjacent sequences:  A077608 A077609 A077610 * A077612 A077613 A077614

KEYWORD

nonn

AUTHOR

Leroy Quet Frank Ruskey (ruskey(AT)cs.uvic.ca) and Dean Hickerson (dean.hickerson(AT)yahoo.com), Nov 11 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 13:08 EST 2012. Contains 205623 sequences.