cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A155518 Number of permutations p of {1,2,...,n} such that p(j) + p(n+1-j) != n+1 for all j.

Original entry on oeis.org

1, 0, 0, 4, 16, 64, 384, 2880, 23040, 208896, 2088960, 23193600, 278323200, 3640688640, 50969640960, 768126320640, 12290021130240, 209688566169600, 3774394191052800, 71921062285148160, 1438421245702963200
Offset: 0

Views

Author

Emeric Deutsch, Jan 26 2009

Keywords

Examples

			a(3)=4 because we have 132, 312, 213 and 231 (123 and 321 do not qualify).
		

Crossrefs

Programs

  • Maple
    g[0] := 1: g[1] := 0: for n from 2 to 20 do g[n] := (2*(n-1))*(g[n-1]+g[n-2]) end do: a := proc (n) if `mod`(n, 2) = 1 then factorial((1/2)*n-1/2)*2^((1/2)*n-1/2)*g[(1/2)*n+1/2] else factorial((1/2)*n)*2^((1/2)*n)*g[(1/2)*n] end if end proc: seq(a(n), n = 0 .. 24);

Formula

a(n) = A155517(n,0).
a(2n-1) = (n-1)!*2^(n-1)*g(n), a(2n) = n!*2^n*g(n), where g(n) = A053871(n) is defined by g(0)=1, g(1)=0, g(n) = 2(n-1)*(g(n-1) + g(n-2)) for n>=2.

A155519 a(n) = Sum (J(p): p is a permutation of {1,2,...,n}), where J(p) is the number of j <= ceiling(n/2) such that p(j) + p(n+1-j) = n+1.

Original entry on oeis.org

1, 2, 4, 16, 72, 432, 2880, 23040, 201600, 2016000, 21772800, 261273600, 3353011200, 46942156800, 697426329600, 11158821273600, 188305108992000, 3389491961856000, 64023737057280000, 1280474741145600000
Offset: 1

Views

Author

Emeric Deutsch, Jan 26 2009

Keywords

Comments

a(n) = Sum_{k=0..ceiling(n/2)} k*A155517(n,k).

Examples

			a(3)=4 because J(123)=2 (counting j=1,2), J(321)=2 (counting j=1,2) and J(132) = J(312) = J(213) = J(231) = 0.
		

Crossrefs

Programs

  • Maple
    a := proc (n) if `mod`(n, 2) = 1 then (1/2)*(n+1)*factorial(n-1) else (1/2)*factorial(n-2)*n^2 end if end proc: seq(a(n), n = 1 .. 23);

Formula

a(2n-1) = n(2n-2)!; a(2n) = 2(2n-2)!*n^2.
Showing 1-2 of 2 results.