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.

A280364 Number of 2 X 2 matrices with all elements in {0,...,n} with permanent = determinant^n.

Original entry on oeis.org

0, 12, 35, 56, 99, 132, 195, 240, 323, 380, 483, 552, 675, 756, 899, 992, 1155, 1260, 1443, 1560, 1763, 1892, 2115, 2256, 2499, 2652, 2915, 3080, 3363, 3540, 3843, 4032, 4355, 4556, 4899, 5112, 5475, 5700, 6083, 6320, 6723, 6972, 7395, 7656, 8099, 8372, 8835, 9120, 9603, 9900, 10403
Offset: 0

Views

Author

Indranil Ghosh, Jan 01 2017

Keywords

Examples

			For n=2, the matrices are [0,0,0,0], [0,0,0,1], [0,0,0,2], [0,0,1,0], [0,0,1,1], [0,0,1,2], [0,0,2,0], [0,0,2,1], [0,0,2,2], [0,1,0,0], [0,1,0,1], [0,1,0,2], [0,1,1,0], [0,1,1,1], [0,1,1,2], [0,2,0,0], [0,2,0,1], [0,2,0,2], [1,0,0,0], [1,0,0,1], [1,0,1,0], [1,0,1,1], [1,0,2,0], [1,0,2,1], [1,1,0,0], [1,1,0,1], [1,1,1,0], [1,2,0,0], [1,2,0,1], [2,0,0,0], [2,0,1,0], [2,0,2,0], [2,1,0,0], [2,1,1,0], [2,2,0,0].
Here each of these 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]. There are 35 possibilities. So for n=2, a(n)=35.
		

Crossrefs

Cf. A280344 (Number of 2 X 2 matrices with all elements in {0,...,n} with determinant = permanent^n).

Programs

  • Mathematica
    CoefficientList[Series[x (12 + 23 x - 3 x^2 - 3 x^3 + 3 x^4)/((1 - x)^3*(1 + x)^2), {x, 0, 50}], x] (* Michael De Vlieger, Jan 01 2017 *)
  • Python
    def t(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*d-b*c)**n==(a*d+b*c):
                            s+=1
        return s
    for i in range(0,51):
        print(i, t(i))
    
  • Python
    def a(n):
        if n==0:
            return 0
        if n==1:
            return 12
        return (((-2*n-1)*a(n-1))//(2*n-1))+8*n**2+10*n+3
    for i in range(0,51):
        print(i, a(i))

Formula

a(n) = (((-2*n-1)*a(n-1))/(2*n-1)) + 8*n^2 + 10*n + 3 for n>=2. [Corrected by David Radcliffe, Aug 13 2025]
Conjectures from Colin Barker, Jan 01 2017: (Start)
a(n) = 4*n^2 + 8*n + 3 for n>0 and even.
a(n) = 4*n^2 + 6*n + 2 for n odd.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>5.
G.f.: x*(12 + 23*x - 3*x^2 - 3*x^3 + 3*x^4) / ((1 - x)^3*(1 + x)^2). (End)