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 A279018 #20 Aug 11 2025 19:26:53 %S A279018 0,0,8,24,56,100,156,236,320,408,540,692,844,1044,1228,1368,1592,1884, %T A279018 2180,2500,2764,2996,3356,3756,4080,4456,4884,5276,5740,6252,6740, %U A279018 7316,7868,8340,8860,9352,9896,10628,11324 %N A279018 Number of 2 X 2 matrices having entries in {-n,...,0,..,n} and permanent=trace with no entry repeated. %H A279018 Indranil Ghosh, <a href="/A279018/b279018.txt">Table of n, a(n) for n = 0..150</a> %t A279018 f[n_] := f[n] = Block[{a, b, c, d, s = 0}, a = -n; While[a < n +1, b = -n; While[b < n +1, c = -n; While[c < n +1, d = -n; While[d < n +1, If[ a != b && a != c && a != d && b != c && b != d && c != d && a*d + b*c == a + d, s++]; d++]; c++]; b++]; a++]; s]; Array[f, 40, 0] (* _Robert G. Wilson v_, Dec 03 2016 *) %o A279018 (Python) %o A279018 def t(n): %o A279018 s=0 %o A279018 for a in range(-n,n+1): %o A279018 for b in range(-n,n+1): %o A279018 for c in range(-n,n+1): %o A279018 for d in range(-n,n+1): %o A279018 if (a!=b and a!=d and b!=d and c!=a and c!=b and c!=d): %o A279018 if (a*d+b*c)==a+d: %o A279018 s+=1 %o A279018 return s %o A279018 for i in range(0,151): %o A279018 print(i, t(i)) %Y A279018 Cf. A211145 (wherein the entries can be repeated). %K A279018 nonn %O A279018 0,3 %A A279018 _Indranil Ghosh_, Dec 03 2016