OFFSET
0,3
LINKS
Indranil Ghosh and Chai Wah Wu, Table of n, a(n) for n = 0..10000 (terms for n = 0..200 from Indranil Ghosh)
EXAMPLE
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],
[4,2,0,2], [4,2,1,3] and [4,2,2,4]. There are 18 possibilities.
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].
So, for n = 4, a(n) = 18.
PROG
(Python)
def t(n):
s=0
for a in range(n+1):
for b in range(n+1):
for c in range(n+1):
for d in range(n+1):
if (a+b+c+d)==(a*d-b*c):
s+=1
return s
for i in range(51):
print(str(i)+" "+str(t(i)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Indranil Ghosh, Jan 10 2017
STATUS
approved