cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A280343 Number of 2 X 2 matrices with all elements in {-n,..,0,..,n} with determinant = 2*permanent.

This page as a plain text file.
%I A280343 #20 Jun 15 2025 09:35:19
%S A280343 1,25,81,233,401,585,1009,1289,1681,2377,2913,3353,4497,5033,5793,
%T A280343 7097,8065,8761,10721,11513,12961,14873,16113,17065,19873,21225,22689,
%U A280343 25465,27585,28793,32561,33865,36113,39177,41121,43481,48801,50361,52529,56201,59793
%N A280343 Number of 2 X 2 matrices with all elements in {-n,..,0,..,n} with determinant = 2*permanent.
%H A280343 Indranil Ghosh and Chai Wah Wu, <a href="/A280343/b280343.txt">Table of n, a(n) for n = 0..10000</a> (terms n = 0..145 from Indranil Ghosh)
%F A280343 a(n) = (4*n+1)^2 + 8 * Sum_{k>0} d(k,n)*d(3*k,n) where d(k,n) is the number of integer solutions to x*y = k with 1 <= x,y <= n. - _David Radcliffe_, Jun 14 2025
%o A280343 (Python)
%o A280343 def t(n):
%o A280343     s=0
%o A280343     for a in range(-n,n+1):
%o A280343         for b in range(-n,n+1):
%o A280343             for c in range(-n,n+1):
%o A280343                 for d in range(-n,n+1):
%o A280343                     if (a*d-b*c)==2*(a*d+b*c):
%o A280343                         s+=1
%o A280343     return s
%o A280343 for i in range(0,146):
%o A280343     print(str(i)+" "+str(t(i)))
%o A280343 (Python)
%o A280343 def a280343_gen(lim):
%o A280343     yield 1
%o A280343     N = lim*lim
%o A280343     M = (N+2)//3
%o A280343     a = np.zeros(N, dtype=np.int64) # Counts solutions to x*y=k with x,y in 1..n
%o A280343     for n in range(1, lim):
%o A280343         a[n:n*n:n] += 2
%o A280343         a[n*n] += 1
%o A280343     yield (4*n+1)**2 + 8*int(a[3::3] @ a[1:M]) # _David Radcliffe_, Jun 14 2025
%Y A280343 Cf. A016754 (number of 2 X 2 matrices with all elements in {0,..,n} with determinant = 2*permanent).
%K A280343 nonn
%O A280343 0,2
%A A280343 _Indranil Ghosh_, Jan 01 2017