cp's OEIS Frontend

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.

A280588 Number of 2 X 2 matrices with all terms in {0,1,...,n} and (sum of terms) = determinant.

This page as a plain text file.
%I A280588 #26 Jun 06 2020 13:01:11
%S A280588 1,1,2,9,18,41,58,97,130,185,226,313,354,457,538,649,738,889,954,1145,
%T A280588 1266,1449,1578,1809,1930,2177,2362,2609,2770,3129,3242,3609,3810,
%U A280588 4097,4402,4793,5026,5433,5674,6097,6346,6929,7090,7641,8010,8433,8810,9369,9626,10297,10690
%N A280588 Number of 2 X 2 matrices with all terms in {0,1,...,n} and (sum of terms) = determinant.
%H A280588 Indranil Ghosh and Chai Wah Wu, <a href="/A280588/b280588.txt">Table of n, a(n) for n = 0..10000</a> (terms for n = 0..200 from Indranil Ghosh)
%e A280588 For n = 4, the possible matrices are [0,0,0,0], [2,0,0,2], [2,0,1,3],[2,0,2,4], [2,1,0,3], [2,2,0,4], [3,0,1,2], [3,0,3,3], [3,1,0,2], [3,1,1,3], [3,1,2,4], [3,2,1,4], [3,3,0,3], [4,0,2,2], [4,1,2,3],
%e A280588 [4,2,0,2], [4,2,1,3] and [4,2,2,4]. There are 18 possibilities.
%e A280588 Here each of the matrices are defined as M = [a,b,c,d], where a = M[1][1], b = M[1][2], c = M[2][1] and d = M[2][2].
%e A280588 So, for n = 4, a(n) = 18.
%o A280588 (Python)
%o A280588 def t(n):
%o A280588     s=0
%o A280588     for a in range(n+1):
%o A280588         for b in range(n+1):
%o A280588             for c in range(n+1):
%o A280588                 for d in range(n+1):
%o A280588                     if (a+b+c+d)==(a*d-b*c):
%o A280588                         s+=1
%o A280588     return s
%o A280588 for i in range(51):
%o A280588     print(str(i)+" "+str(t(i)))
%Y A280588 Cf. A210374 (Number of 2 X 2 matrices with all terms in {0,1,...,n} and (sum of terms) = n+2).
%K A280588 nonn
%O A280588 0,3
%A A280588 _Indranil Ghosh_, Jan 10 2017