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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A135538 Number of triples in all permutations of order n that are collinear modulo n. 2
0, 0, 6, 32, 400, 2304, 35280, 322560, 3888000, 48384000, 731808000, 9858723840, 161902540800, 2628760780800, 43181994240000, 876764528640000, 16124496740352000, 358721232629760000, 6933770723303424000, 168738115888742400000, 3644128675321085952000, 94201965756599500800000 (list; graph; refs; listen; history; internal format)
OFFSET

1,3

LINKS

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

FORMULA

For n>=3, a(n) = (n-3)! * A146557(n).

EXAMPLE

For example, in a permutation p=[5,2,4,3,1], a triple of points { (2,p(2)=2), (4,p(4)=3), (5,p(5)=1) } is collinear, since they are located on the line: x + 3*y == 3 (mod 5).

PROG

(PARI) { a(n) = if(n<3, 0, (n-3)! * n * sum(i=1, n, sum(j=1, n-i-1, (n-i-j) * (n*gcd([i, j, n-i-j]) - gcd(i, n) - gcd(j, n) - gcd(i+j, n) + 2) ))) }

CROSSREFS

Sequence in context: A121120 A183681 A185386 * A132548 A140521 A171141

Adjacent sequences:  A135535 A135536 A135537 * A135539 A135540 A135541

KEYWORD

nonn

AUTHOR

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

EXTENSIONS

Edited and extended by Max Alekseyev, Oct 31 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 15 21:56 EST 2012. Contains 205860 sequences.