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 A278348 #56 Jun 06 2020 12:59:59 %S A278348 0,0,0,0,0,0,16,16,32,40,72,72,136,136,184,248,304,304,408,408,536, %T A278348 632,712,712,920,968,1064,1168,1360,1360,1664,1664,1848,2008,2136, %U A278348 2328,2696,2696,2840,3032,3432,3432,3880,3880,4200,4592,4768,4768,5336,5456,5824 %N A278348 Number of 2 X 2 singular integer matrices with elements from {0,...,n} with no elements repeated. %C A278348 If p is prime then a(p) = a(p-1). - _Robert G. Wilson v_, Nov 20 2016 %H A278348 Indranil Ghosh, Charles R Greathouse IV and Chai Wah Wu, <a href="/A278348/b278348.txt">Table of n, a(n) for n = 0..10000</a> (first 101 terms from Ghosh, next 1900 terms from Charles R Greathouse IV) %H A278348 Charles R Greathouse IV, <a href="/A278348/a278348.c.txt">C program for computing this sequence</a> %t A278348 f[n_] := f[n] = Block[{a = 1, b, c, s = 0}, While[b = a + 1; a < n + 1, While[c = b + 1; b < n + 1, While[c < n + 1, If[a != b && a != c && a != n && b != c && b != n && c != n && a*n == b*c, s++]; c++]; b++]; a++]; 8 s + f[n - 1]]; f[0] = 0; Array[f, 51] (* or *) %t A278348 g[n_] := g[n] = Block[{c = 0, k = 1}, While[k < n, c += Count[ Times @@@ Select[ Tuples[ Rest@ Most@ Divisors[k*n], 2], #[[1]] < #[[2]] < n &], k*n]; k++]; c]; 8*Accumulate[ Array[g, 51]] (* much faster but both are recursive *) (* _Robert G. Wilson v_, Nov 20 2016 *) %o A278348 (Python) %o A278348 def p(n): %o A278348 s=0 %o A278348 for a in range(n+1): %o A278348 for b in range(n+1): %o A278348 for c in range(n+1): %o A278348 for d in range(n+1): %o A278348 if (a!=b and a!=d and b!=d and c!=a and c!=b and c!=d): %o A278348 if a*d==b*c: %o A278348 s+=1 %o A278348 return s %o A278348 for i in range(101): %o A278348 print(str(i)+" "+str(p(i))) %o A278348 (PARI) try(a,b,c,n)=my(d=b*c/a); denominator(d)==1 && d<=n && d!=a && d!=b && d!=c %o A278348 a(n)=2*sum(a=3,n, sum(b=2,a-1, sum(c=1,b-1, try(a,b,c,n) + try(c,a,b,n) + try(b,a,c,n)))) \\ _Charles R Greathouse IV_, Nov 20 2016 %o A278348 (C) See Greathouse link. %Y A278348 Cf. A059306 (where in the matrices each element can be present multiple times). %K A278348 nonn %O A278348 0,7 %A A278348 _Indranil Ghosh_, Nov 18 2016