Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A135538
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A135538 Number of collinear triples (modulo n) in all permutations of [n]. +0
1
6, 16, 160, 864, 9072, 69120, 829440 (list; graph; listen)
OFFSET

3,1

COMMENT

If n>=5, triples may have strides larger than 1. Example for n=5: in

the permutation [1,3,5,2,4], triples [1,3,5], [3,5,2], [5,2,4] and [1,5,4]

contribute, where the latter aligns pi(1)=1, pi(3)=5 and pi(5)=4 =9 mod 5.

LINKS

L. Li, Collinear triples in permutations, arXiv:0802.0572

EXAMPLE

For n=4 consider the A000142(4)=24 permutations of [1,2,3,4]. From [1,2,3,4],

the triples [1,2,3] and [2,3,4] contribute to a(4). No triples from [1,2,4,3],

[1,3,2,4], [1,3,4,2] and [1,4,2,3] contribute. From [1,4,3,2] the triples

[1,4,3] (that is [1,4,7] mod 4) and [4,3,2] contribute. From [2,1,3,4], no triples

contribute. From [2,1,4,3], [2,1,4] (that is [2,1,0] mod 4) and [1,4,3] contribute,

the latter counting again although found earlier. So far we saw 6 triples

for a(4); scanning the remaining permutations increases this to a(4)=16.

MAPLE

a := proc(n) local a, pers, p, stri, i1, extr, tri ; a :=0 ; pers := combinat[permute](n) ; for p in pers do for stri from 1 to floor((n-1)/2) do for i1 from 1 to n-2*stri do tri := [op(i1, p), op(i1+stri, p), op(i1+2*stri, p)] ; extr := op(1, tri)+2*( op(2, tri)-op(1, tri) ) ; if extr mod n = op(3, tri) mod n then a := a+1 ; fi ; od; od; od: RETURN(a) ; end: for n from 3 do print(n, a(n)) ; od:

CROSSREFS

Sequence in context: A034191 A115331 A113561 this_sequence A080809 A118949 A053334

Adjacent sequences: A135535 A135536 A135537 this_sequence A135539 A135540 A135541

KEYWORD

more,nonn

AUTHOR

R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Feb 22 2008

page 1

Search completed in 0.003 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 July 23 10:48 EDT 2008. Contains 142285 sequences.


AT&T Labs Research