login
Number of 2 X 2 matrices with all elements in {0,..,n} and (sum of terms) = permanent.
4

%I #31 May 04 2021 02:03:21

%S 1,1,4,36,52,76,92,116,136,160,176,208,224,248,272,300,316,348,364,

%T 396,420,444,460,500,520,544,568,600,616,656,672,704,728,752,776,820,

%U 836,860,884,924,940,980,996,1028,1060,1084,1100,1148,1168,1200,1224,1256,1272,1312,1336,1376,1400,1424,1440,1496,1512,1536

%N Number of 2 X 2 matrices with all elements in {0,..,n} and (sum of terms) = permanent.

%C a(n) mod 4 = 0 for n > 1.

%C a(n) is also the number of 2 X 2 matrices with all elements in {-1,..,n-1} and permanent = 2. - _Chai Wah Wu_, Jan 11 2017

%H Indranil Ghosh and Chai Wah Wu, <a href="/A280934/b280934.txt">Table of n, a(n) for n = 0..10000</a> (terms for n = 0..200 from Indranil Ghosh)

%H Chai Wah Wu, <a href="/A280934/a280934_1.pdf">Proof of formula a(n) = a(n-1) + 4*tau(n+1) + 8 for n > 3.</a>

%F a(n) = a(n-1) + 4*A000005(n+1) + 8 for n > 3. - _Chai Wah Wu_, Jan 11 2017

%e For n = 3, the possible matrices are [0,0,0,0], [0,2,2,0], [0,2,3,1],[0,3,2,1], [0,3,3,3], [1,2,3,0], [1,2,3,1], [1,2,3,2], [1,2,3,3], [1,3,2,0], [1,3,2,1], [1,3,2,2], [1,3,2,3], [2,0,0,2], [2,0,1,3], [2,1,0,3], [2,1,1,3], [2,1,2,3], [2,1,3,3], [2,2,1,3], [2,2,2,2], [2,2,3,1], [2,3,1,3], [2,3,2,1], [3,0,1,2], [3,0,3,3], [3,1,0,2], [3,1,1,2], [3,1,2,2], [3,1,3,2], [3,2,1,2], [3,2,3,1], [3,3,0,3], [3,3,1,2], [3,3,2,1] and [3,3,3,0]. There are 36 possibilities.

%e Here each of the matrices 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, for n = 3, a(n) = 36.

%o (Python)

%o def t(n):

%o s=0

%o for a in range(n+1):

%o for b in range(n+1):

%o for c in range(n+1):

%o for d in range(n+1):

%o if (a+b+c+d)==(a*d+b*c):

%o s+=1

%o return s

%o for i in range(201):

%o print(str(i)+" "+str(t(i)))

%o (Python)

%o from sympy import divisor_count

%o A280934_list = [1,1,4,36]

%o for i in range(4,100):

%o A280934_list.append(A280934_list[-1]+4*divisor_count(i+1)+8) # _Chai Wah Wu_, Jan 11 2017

%Y Cf. A000005, A210374, A280588.

%K nonn

%O 0,3

%A _Indranil Ghosh_, Jan 11 2017