OFFSET
0,2
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..186
EXAMPLE
For n = 3, few of the possible matrices are [-3,-3,-3,0], [-3,-3,-1,1], [-3,-3,1,2], [-3,-3,3,3], [-3,-2,-1,1], [-3,-2,3,2], [-3,-1,-3,1], [-3,-1,-2,1], [-3,-1,-1,1], [-3,-1,0,1], [-3,-1,1,1], [-3,-1,2,1], [-3,-1,3,1], [-3,0,-1,1], [2,0,0,2], [2,0,1,3], [2,1,-3,-3], [2,1,-2,-1], [2,1,-1,1], [3,3,0,3],...There are 271 possibilities.
Here each of the matrices M is defined as M = [a,b;c,d] where a = M[1][1], b = M[1][2], c = M[2][1], d = M[2][2]. So, a(3) = 271.
PROG
(Python)
def t(n):
s=0
for a in range(-n, n+1):
for b in range(-n, n+1):
for c in range(-n, n+1):
for d in range(-n, n+1):
if (a+b+c+d)==(a*d-b*c):
s+=1
return s
for i in range(0, 187):
print(f"{i} {t(i)}")
(PARI) a(n)=sum(a=-n, n, sum(d=-n, n, my(t=a*d+a+d); sum(b=-n, n, if(b==-1, if(t==-1, 2*n+1, 0), my(c=(t-b)/(b+1)); denominator(c)==1 && c<=n && c>=-n)))) \\ Charles R Greathouse IV, Jan 17 2017
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Indranil Ghosh, Jan 17 2017
STATUS
approved