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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A091217 Number of permutations p of [n] such that the n-1 sums p(i)+p(i+1) (i=1,2,...n-1) are all distinct. 2
1, 2, 6, 16, 54, 232, 1132, 6024, 36262, 242080, 1775316, 14135584, 122077832, 1131066448, 11230979624, 118638940864 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..16.

EXAMPLE

For a(4), we have 2+3=1+4, so a(4)=4! - (23)(14) - (14)(32) = 24 - 4 - 4 = 16.

For a(5), we have 1+4=2+3, 1+5=2+4, 2+5=3+4 to avoid.

PROG

(PARI) { for (i=3, 9, v=vector(i-1); c=0; for (j=1, i!, x=numtoperm(i, j); for (k=1, i-1, v[k]=x[k]+x[k+1]); fl=0; v=vecsort(v); for (z=1, i-2, if (v[z]==v[z+1], fl=1; break)); if (fl==0, c++)); print1(", "c)) }

CROSSREFS

Sequence in context: A147949 A147940 A147931 * A147891 A147922 A147913

Adjacent sequences:  A091214 A091215 A091216 * A091218 A091219 A091220

KEYWORD

hard,more,nonn

AUTHOR

Jon Perry, Feb 23 2004

EXTENSIONS

Terms a(10) and a(11) from John W. Layman, Mar 10 2004

More terms. R. H. Hardin, Nov 11 2008

Corrected definition. - Emeric Deutsch, Nov 28 2008

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 17 00:10 EST 2018. Contains 317275 sequences. (Running on oeis4.)