This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A146557 #15 Jul 27 2025 11:15:48 %S A146557 0,0,6,32,200,384,1470,2688,5400,9600,18150,27168,44616,65856,90150, %T A146557 140800,184960,274320,331398,474400,569184,774400,896126,1366656, %U A146557 1390000,1881984,2204982,2899232,2967048,4545600,4180350,5904384 %N A146557 Number of collinear triples of distinct points in Zn x Zn with no two on the same "horizontal" or "vertical" line. %C A146557 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. %C A146557 Conjecture: if 3 does not divide n then n^2 divides a(n). - _Peter Bala_, Jul 24 2025 %H A146557 G. C. Greubel, <a href="/A146557/b146557.txt">Table of n, a(n) for n = 1..1000</a> %F A146557 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. %t A146557 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 *) %o A146557 (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) )) } %K A146557 nonn %O A146557 1,3 %A A146557 _Max Alekseyev_, Oct 31 2008