A210000
Number of unimodular 2 X 2 matrices having all terms in {0,1,...,n}.
Original entry on oeis.org
0, 6, 14, 30, 46, 78, 94, 142, 174, 222, 254, 334, 366, 462, 510, 574, 638, 766, 814, 958, 1022, 1118, 1198, 1374, 1438, 1598, 1694, 1838, 1934, 2158, 2222, 2462, 2590, 2750, 2878, 3070, 3166, 3454, 3598, 3790, 3918, 4238, 4334, 4670, 4830
Offset: 0
a(2)=6 counts these matrices (using reduced matrix notation):
(1,0,0,1), determinant = 1, inverse = (1,0,0,1)
(1,0,1,1), determinant = 1, inverse = (1,0,-1,1)
(1,1,0,1), determinant = 1, inverse = (1,-1,0,1)
(0,1,1,0), determinant = -1, inverse = (0,1,1,0)
(0,1,1,1), determinant = -1, inverse = (-1,1,1,0)
(1,1,1,0), determinant = -1, inverse = (0,1,1,-1)
See also the very useful list of cross-references in the Comments section.
-
a = 0; b = n; z1 = 50;
t[n_] := t[n] = Flatten[Table[w*z - x*y, {w, a, b}, {x, a, b}, {y, a, b}, {z, a, b}]]
c[n_, k_] := c[n, k] = Count[t[n], k]
Table[c[n, 0], {n, 0, z1}] (* A059306 *)
Table[c[n, 1], {n, 0, z1}] (* A171503 *)
2 % (* A210000 *)
Table[c[n, 2], {n, 0, z1}] (* A209973 *)
%/4 (* A209974 *)
Table[c[n, 3], {n, 0, z1}] (* A209975 *)
Table[c[n, 4], {n, 0, z1}] (* A209976 *)
Table[c[n, 5], {n, 0, z1}] (* A209977 *)
A211032
Number of 2 X 2 matrices having all elements in {0,1,...,n} and determinant in the open interval (-n,n).
Original entry on oeis.org
10, 45, 134, 289, 560, 903, 1476, 2091, 3014, 4059, 5456, 6823, 8994, 10905, 13434, 16275, 19740, 22871, 27440, 31327, 36778, 42147, 48176, 53755, 62164, 69241, 77466, 86047, 96474, 105249, 118114, 128261, 141542, 154371, 168172
Offset: 1
-
a = 0; b = n; z1 = 40;
t[n_] := t[n] = Flatten[Table[w*z - x*y, {w, a, b}, {x, a, b}, {y, a, b}, {z, a, b}]]
c[n_, k_] := c[n, k] = Count[t[n], k]
c1[n_, m_] := c1[n, m] = Sum[c[n, k], {k, -n, m}]
Table[c1[n, n - 1] - c1[n, -n], {n, 1, z1}] (* A211032 *)
A279063
Number of 2 X 2 matrices having entries in {0,1,...,n} and determinant in the closed interval [-n,n] with no entry repeated.
Original entry on oeis.org
0, 0, 0, 16, 56, 136, 296, 512, 864, 1280, 1912, 2616, 3680, 4760, 6200, 7848, 9792, 11832, 14632, 17280, 20784, 24352, 28480, 32584, 38200, 43168, 49160, 55472, 62936, 69784, 79008, 86944, 96952, 106816, 117672, 128592, 142352, 154088, 167968
Offset: 0
Cf.
A211031 (where in the entries can be repeated).
-
f:= proc(n) local C;
C:= combinat:-choose([$0..n],4);
C:= map(t -> (t[1]*t[2]-t[3]*t[4],t[1]*t[3]-t[2]*t[4],t[1]*t[4]-t[2]*t[3]), C);
8*nops(select(t -> abs(t)<=n, C))
end proc:
map(f, [$0..40]); # Robert Israel, Dec 05 2016
-
def a(n):
s=0
for a in range(0,n+1):
for b in range(0,n+1):
for c in range(0,n+1):
for d in range(0,n+1):
if (a!=b and a!=d and b!=d and c!=a and c!=b and c!=d):
if (a*d-b*c) in range(-n,n+1):
s+=1
return s
print([a(n) for n in range(39)])
Showing 1-3 of 3 results.
Comments