

A146557


Number of collinear triples of distinct points in Zn x Zn with no two on the same "horizontal" or "vertical" line.


2



0, 0, 6, 32, 200, 384, 1470, 2688, 5400, 9600, 18150, 27168, 44616, 65856, 90150, 140800, 184960, 274320, 331398, 474400, 569184, 774400, 896126, 1366656, 1390000, 1881984, 2204982, 2899232, 2967048, 4545600, 4180350, 5904384
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

Number of 3x3 matrices [1, x, u; 1, y, v; 1, z, w] over Z_n with zero determinant, where elements of the triples x,y,z and u,v,w are distinct.


LINKS

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


FORMULA

a(n) = n * SUM k * ( n * gcd(i,j,k)  gcd(i,n)  gcd(j,n)  gcd(k,n) + 2 ), where the sum is taken over all triples of positive integers i,j,k with i+j+k=n.


PROG

(PARI) { a(n) = n * sum(i=1, n, sum(j=1, ni, (nij) * (n*gcd([i, j, nij])  gcd(i, n)  gcd(j, n)  gcd(i+j, n) + 2) )) }


CROSSREFS

Sequence in context: A216441 A108188 A020058 * A020013 A221540 A121120
Adjacent sequences: A146554 A146555 A146556 * A146558 A146559 A146560


KEYWORD

nonn


AUTHOR

Max Alekseyev, Oct 31 2008


STATUS

approved



