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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A216727 First column of A216726. 2
1, 6, 18, 93, 600, 4320, 35168, 321630, 3257109, 36199458, 438126986, 5736774869, 80808984725, 1218563192160, 19587031966352, 334329804180135, 6039535339644630, 115118210695441900, 2308967760171049528, 48613722701440862328, 1072008447320752890459 (list; graph; refs; listen; history; text; internal format)
OFFSET

3,2

COMMENTS

For odd n A216727(n) = A165962(n).

REFERENCES

Wayne M. Dymacek, Isaac Lambert and Kyle Parsons, Arithmetic Progressions in Permutations, http://math.ku.edu/~ilambert/CN.pdf, 2012.

LINKS

Table of n, a(n) for n=3..23.

MATHEMATICA

f[i_, n_, k_]:=If[i==0 && k==0, 1, If[i==n && n==k, 1, Binomial[k-1, k-i]*Binomial[n-k-1, k-i-1] + 2*Binomial[k-1, k-i-1]*Binomial[n-k-1, k-i-1]+Binomial[k-1, k-i-1]*Binomial[n-k-1, k-i]]];

w1[i_, n_, k_]:=If[n-2k+i<0, 0, If[n-2k+i==0, 1, (n-2k+i-1)!]];

a[n_, k_]:=Sum[f[i, n, k]*w1[i, n, k], {i, 0, k}];

A165962[n_]:=(n-1)!+Sum[(-1)^k*a[n, k], {k, 1, n}];

b[n_, k_]:=Sum[Sum[Sum[f[j, n/2, p]*f[i-j, n/2, k-p]*w2[i, j, n, k, p], {p, 0, k}], {j, 0, i}], {i, 0, k-1}];

w2[i_, j_, n_, k_, p_]:=If[n/2-2p+j<=0 || n/2-2(k-p)+(i-j)<=0, 0, (n-2k+i-1)!];

A216727[n_?EvenQ]:=(n-1)!+Sum[(-1)^k*b[n, k], {k, 1, n}];

A216727[n_?OddQ]:=A165962[n];

Table[A216727[n], {n, 3, 23}] (* David Scambler, Sep 18 2012 *)

CROSSREFS

Cf. A216726, A165962.

Sequence in context: A294471 A194995 A104970 * A151470 A280096 A009573

Adjacent sequences:  A216724 A216725 A216726 * A216728 A216729 A216730

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, Sep 15 2012

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 17 04:03 EDT 2019. Contains 327119 sequences. (Running on oeis4.)