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
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = n * Sum_{i,j,k} ( n * gcd(i,j,k) - gcd(i,n) - gcd(j,n) - gcd(k,n) + 2 ) * k, where the sum is taken over all triples of positive integers i,j,k with i+j+k=n.
MATHEMATICA
f[n_] := n*Sum[ Sum[ (n - i - j)*( n*GCD[i, j, n - i - j] - GCD[i, n] - GCD[j, n] - GCD[i + j, n] + 2 ) , {j, 1, n - i}] , {i, 1, n}]; Table[f[n], {n, 1, 25}] (* G. C. Greubel, Oct 18 2016 *)
PROG
(PARI) { a(n) = n * sum(i=1, n, sum(j=1, n-i, (n-i-j) * (n*gcd([i, j, n-i-j]) - gcd(i, n) - gcd(j, n) - gcd(i+j, n) + 2) )) }
CROSSREFS
KEYWORD
nonn
AUTHOR
Max Alekseyev, Oct 31 2008
STATUS
approved