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.
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
Links
- Indranil Ghosh, Table of n, a(n) for n = 0..150
Crossrefs
Cf. A211031 (where in the entries can be repeated).
Programs
-
Maple
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
-
Python
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)])
Comments