Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A091217
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A091217 Number of pairs of permutations of [n] such that the sums of all adjacent elements are unique. +0
3
1, 2, 6, 16, 54, 232, 1132, 6024, 36262, 242080, 1775316 (list; graph; listen)
OFFSET

1,2

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.

PROGRAM

(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

Adjacent sequences: A091214 A091215 A091216 this_sequence A091218 A091219 A091220

Sequence in context: A100664 A003446 A045696 this_sequence A068787 A073959 A006820

KEYWORD

more,nonn

AUTHOR

Jon Perry (perry(AT)globalnet.co.uk), Feb 23 2004

EXTENSIONS

Terms a(10) and a(11) from John W. Layman (layman(AT)math.vt.edu), Mar 10 2004

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified October 10 20:39 EDT 2008. Contains 144831 sequences.


AT&T Labs Research