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.

Showing 1-5 of 5 results.

A210000 Number of unimodular 2 X 2 matrices having all terms in {0,1,...,n}.

Original entry on oeis.org

0, 6, 14, 30, 46, 78, 94, 142, 174, 222, 254, 334, 366, 462, 510, 574, 638, 766, 814, 958, 1022, 1118, 1198, 1374, 1438, 1598, 1694, 1838, 1934, 2158, 2222, 2462, 2590, 2750, 2878, 3070, 3166, 3454, 3598, 3790, 3918, 4238, 4334, 4670, 4830
Offset: 0

Views

Author

Clark Kimberling, Mar 16 2012

Keywords

Comments

a(n) is the number of 2 X 2 matrices having all terms in {0,1,...,n} and inverses with all terms integers.
Most sequences in the following guide count 2 X 2 matrices having all terms contained in the domain shown in column 2 and determinant d or permanent p or sum s of terms as indicated in column 3.
A059306 ... {0,1,...,n} ..... d=0
A171503 ... {0,1,...,n} ..... d=1
A210000 ... {0,1,...,n} .... |d|=1
A209973 ... {0,1,...,n} ..... d=2
A209975 ... {0,1,...,n} ..... d=3
A209976 ... {0,1,...,n} ..... d=4
A209977 ... {0,1,...,n} ..... d=5
A210282 ... {0,1,...,n} ..... d=n
A210283 ... {0,1,...,n} ..... d=n-1
A210284 ... {0,1,...,n} ..... d=n+1
A210285 ... {0,1,...,n} ..... d=floor(n/2)
A210286 ... {0,1,...,n} ..... d=trace
A280588 ... {0,1,...,n} ..... d=s
A106634 ... {0,1,...,n} ..... p=n
A210288 ... {0,1,...,n} ..... p=trace
A210289 ... {0,1,...,n} ..... p=(trace)^2
A280934 ... {0,1,...,n} ..... p=s
A210290 ... {0,1,...,n} ..... d>=0
A183761 ... {0,1,...,n} ..... d>0
A210291 ... {0,1,...,n} ..... d>n
A210366 ... {0,1,...,n} ..... d>=n
A210367 ... {0,1,...,n} ..... d>=2n
A210368 ... {0,1,...,n} ..... d>=3n
A210369 ... {0,1,...,n} ..... d is even
A210370 ... {0,1,...,n} ..... d is odd
A210371 ... {0,1,...,n} ..... d is even and >=0
A210372 ... {0,1,...,n} ..... d is even and >0
A210373 ... {0,1,...,n} ..... d is odd and >0
A210374 ... {0,1,...,n} ..... s=n+2
A210375 ... {0,1,...,n} ..... s=n+3
A210376 ... {0,1,...,n} ..... s=n+4
A210377 ... {0,1,...,n} ..... s=n+5
A210378 ... {0,1,...,n} ..... t is even
A210379 ... {0,1,...,n} ..... t is odd
A211031 ... {0,1,...,n} ..... d is in [-n,n]
A211032 ... {0,1,...,n} ..... d is in (-n,n)
A211033 ... {0,1,...,n} ..... d=0 (mod 3)
A211034 ... {0,1,...,n} ..... d=1 (mod 3)
A134506 ... {1,2,...,n} ..... d=0
A196227 ... {1,2,...,n} ..... d=1
A209979 ... {1,2,...,n} .... |d|=1
A197168 ... {1,2,...,n} ..... d=2
A210001 ... {1,2,...,n} ..... d=3
A210002 ... {1,2,...,n} ..... d=4
A210027 ... {1,2,...,n} ..... d=5
A211053 ... {1,2,...,n} ..... d=n
A211054 ... {1,2,...,n} ..... d=n-1
A211055 ... {1,2,...,n} ..... d=n+1
A055507 ... {1,2,...,n} ..... p=n
A211057 ... {1,2,...,n} ..... d is in [0,n]
A211058 ... {1,2,...,n} ..... d>=0
A211059 ... {1,2,...,n} ..... d>0
A211060 ... {1,2,...,n} ..... d>n
A211061 ... {1,2,...,n} ..... d>=n
A211062 ... {1,2,...,n} ..... d>=2n
A211063 ... {1,2,...,n} ..... d>=3n
A211064 ... {1,2,...,n} ..... d is even
A211065 ... {1,2,...,n} ..... d is odd
A211066 ... {1,2,...,n} ..... d is even and >=0
A211067 ... {1,2,...,n} ..... d is even and >0
A211068 ... {1,2,...,n} ..... d is odd and >0
A209981 ... {-n,....,n} ..... d=0
A209982 ... {-n,....,n} ..... d=1
A209984 ... {-n,....,n} ..... d=2
A209986 ... {-n,....,n} ..... d=3
A209988 ... {-n,....,n} ..... d=4
A209990 ... {-n,....,n} ..... d=5
A211140 ... {-n,....,n} ..... d=n
A211141 ... {-n,....,n} ..... d=n-1
A211142 ... {-n,....,n} ..... d=n+1
A211143 ... {-n,....,n} ..... d=n^2
A211140 ... {-n,....,n} ..... p=n
A211145 ... {-n,....,n} ..... p=trace
A211146 ... {-n,....,n} ..... d in [0,n]
A211147 ... {-n,....,n} ..... d>=0
A211148 ... {-n,....,n} ..... d>0
A211149 ... {-n,....,n} ..... d<0 or d>0
A211150 ... {-n,....,n} ..... d>n
A211151 ... {-n,....,n} ..... d>=n
A211152 ... {-n,....,n} ..... d>=2n
A211153 ... {-n,....,n} ..... d>=3n
A211154 ... {-n,....,n} ..... d is even
A211155 ... {-n,....,n} ..... d is odd
A211156 ... {-n,....,n} ..... d is even and >=0
A211157 ... {-n,....,n} ..... d is even and >0
A211158 ... {-n,....,n} ..... d is odd and >0

Examples

			a(2)=6 counts these matrices (using reduced matrix notation):
(1,0,0,1), determinant = 1, inverse = (1,0,0,1)
(1,0,1,1), determinant = 1, inverse = (1,0,-1,1)
(1,1,0,1), determinant = 1, inverse = (1,-1,0,1)
(0,1,1,0), determinant = -1, inverse = (0,1,1,0)
(0,1,1,1), determinant = -1, inverse = (-1,1,1,0)
(1,1,1,0), determinant = -1, inverse = (0,1,1,-1)
		

Crossrefs

Cf. A171503.
See also the very useful list of cross-references in the Comments section.

Programs

  • Mathematica
    a = 0; b = n; z1 = 50;
    t[n_] := t[n] = Flatten[Table[w*z - x*y, {w, a, b}, {x, a, b}, {y, a, b}, {z, a, b}]]
    c[n_, k_] := c[n, k] = Count[t[n], k]
    Table[c[n, 0], {n, 0, z1}]  (* A059306 *)
    Table[c[n, 1], {n, 0, z1}]  (* A171503 *)
    2 %                         (* A210000 *)
    Table[c[n, 2], {n, 0, z1}]  (* A209973 *)
    %/4                         (* A209974 *)
    Table[c[n, 3], {n, 0, z1}]  (* A209975 *)
    Table[c[n, 4], {n, 0, z1}]  (* A209976 *)
    Table[c[n, 5], {n, 0, z1}]  (* A209977 *)

Formula

a(n) = 2*A171503(n).

Extensions

A209982 added to list in comment by Chai Wah Wu, Nov 27 2016

A210369 Number of 2 X 2 matrices with all terms in {0,1,...,n} and even determinant.

Original entry on oeis.org

1, 10, 65, 160, 457, 810, 1681, 2560, 4481, 6250, 9841, 12960, 18985, 24010, 33377, 40960, 54721, 65610, 84961, 100000, 126281, 146410, 181105, 207360, 252097, 285610, 342161, 384160, 454441, 506250, 592321, 655360, 759425, 835210, 959617, 1049760
Offset: 0

Views

Author

Clark Kimberling, Mar 20 2012

Keywords

Comments

a(n) is also the number of 2 X 2 matrices with all terms in {0,1,...n} and even permanent.
The determinant will be even if either all entries are odd or if both the leading and trailing diagonals have no more than one odd entry each. - Andrew Howroyd, Apr 28 2020

Crossrefs

Programs

  • Mathematica
    a = 0; b = n; z1 = 28;
    t[n_] := t[n] = Flatten[Table[w*z - x*y, {w, a, b}, {x, a, b}, {y, a, b}, {z, a, b}]]
    c[n_, k_] := c[n, k] = Count[t[n], k]
    u[n_] := Sum[c[n, 2 k], {k, -n^2, n^2}]
    v[n_] := Sum[c[n, 2 k - 1], {k, -n^2, n^2}]
    Table[u[n], {n, 0,  z1}] (* A210369 *)
    Table[v[n], {n, 0, z1}]  (* A210370 *)
  • PARI
    a(n) = {((n+1)^2 - ceil(n/2)^2)^2 + ceil(n/2)^4} \\ Andrew Howroyd, Apr 28 2020

Formula

a(n) + A210370(n) = n^4.
From Colin Barker, Nov 28 2014: (Start)
a(n) = (13 + 3*(-1)^n + 4*(13+3*(-1)^n)*n + 2*(37+7*(-1)^n)*n^2 + 4*(11+(-1)^n)*n^3 + 10*n^4)/16.
G.f.: -(x^7+9*x^6+27*x^5+83*x^4+59*x^3+51*x^2+9*x+1) / ((x-1)^5*(x+1)^4).
(End)
a(n) = ((n+1)^2 - ceiling(n/2)^2)^2 + ceiling(n/2)^4. - Andrew Howroyd, Apr 28 2020

Extensions

Terms a(29) and beyond from Andrew Howroyd, Apr 28 2020

A210373 Number of 2 X 2 matrices with all elements in {0,1,...,n} and positive odd determinant.

Original entry on oeis.org

0, 3, 8, 48, 84, 243, 360, 768, 1040, 1875, 2400, 3888, 4788, 7203, 8624, 12288, 14400, 19683, 22680, 30000, 34100, 43923, 49368, 62208, 69264, 85683, 94640, 115248, 126420, 151875, 165600
Offset: 0

Views

Author

Clark Kimberling, Mar 20 2012

Keywords

Comments

See A210000 for a guide to related sequences.

Crossrefs

Cf. A210000.

Programs

  • Mathematica
    a = 0; b = n; z1 = 30;
    t[n_] := t[n] = Flatten[Table[w*z - x*y, {w, a, b}, {x, a, b}, {y, a, b}, {z, a, b}]]
    c[n_, k_] := c[n, k] = Count[t[n], k]
    u[n_] := u[n] = Sum[c[n, 2 k], {k, 0, n^2}]
    v[n_] := v[n] = Sum[c[n, 2 k], {k, 1, n^2}]
    w[n_] := w[n] = Sum[c[n, 2 k - 1], {k, 1, n^2}]
    Table[u[n], {n, 0, z1}] (* A210371 *)
    Table[v[n], {n, 0, z1}] (* A210372 *)
    Table[w[n], {n, 0, z1}] (* A210373 *)

Formula

From Chai Wah Wu, Nov 27 2016: (Start)
a(n) = A210370(n)/2.
a(n) = (2*n + 1 -(-1)^n)^2*(6*n + 5 -(-1)^n)*(2*n + 3 + (-1)^n)/256
a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) - 6*a(n-4) + 6*a(n-5) + 4*a(n-6) - 4*a(n-7) - a(n-8) + a(n-9) for n > 8.
G.f.: -x*(3*x^5 + 17*x^4 + 16*x^3 + 28*x^2 + 5*x + 3)/((x - 1)^5*(x + 1)^4). (End)

A277044 Number of 2 X 2 matrices with entries in {0,1,...,n} and even determinant with no entry repeated.

Original entry on oeis.org

0, 0, 0, 16, 96, 216, 600, 1008, 2064, 3040, 5280, 7200, 11280, 14616, 21336, 26656, 36960, 44928, 59904, 71280, 92160, 107800, 135960, 156816, 193776, 220896, 268320, 302848, 362544, 405720, 479640, 532800, 623040, 687616, 796416, 873936, 1003680, 1095768, 1248984, 1357360, 1536720, 1663200
Offset: 0

Views

Author

Indranil Ghosh, Dec 12 2016

Keywords

Comments

a(n) mod 8 = 0.

Crossrefs

Cf. A210369 (where the entries can be repeated).

Programs

  • PARI
    F(n,{r=0})={my(s=vector(2),v);forvec(y=vector(4,j,[0,n]),for(k=23*!!r,23,v=numtoperm(4,k);s[1+(y[v[1]]*y[v[4]]-y[v[3]]*y[v[2]])%2]++),2*!r);return(s)} \\ Use r=1 for A210369;
    a(n)=F(n,0)[1]; \\ Also works for A210370 if F(n,1)[2] is used instead. - R. J. Cano, Dec 12 2016
    
  • PARI
    a(n)=my(e=n\2+1,o=(n+1)\2); 24*binomial(o,4) + 16*binomial(e,2)*binomial(o,2) + 24*o*binomial(e,3) + 24*binomial(e,4) \\ Charles R Greathouse IV, Dec 12 2016
  • 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!=b  and a!=d and b!=d and c!=a and c!=b and c!=d):
                            if (a*d-b*c)%2==0:
                                s+=1
        return s
    for i in range(0,201):
        print(f"{i} {t(i)}")
    

Formula

From Colin Barker and Charles R Greathouse IV, Dec 12 2016: (Start)
a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) - 6*a(n-4) + 6*a(n-5) + 4*a(n-6) - 4*a(n-7) - a(n-8) + a(n-9) for n>8.
a(n) = (5*n^4 - 8*n^3 + 4*n^2 - 16*n)/8 for n even.
a(n) = (5*n^4 - 12*n^3 + 2*n^2 + 12*n - 7)/8 for n odd.
G.f.: 8*x^3*(2 + 10*x + 7*x^2 + 8*x^3 + 3*x^4) / ((1 - x)^5*(1 + x)^4).
(End)

A279483 Number of 2 X 2 matrices with entries in {0,1,...,n} and odd determinant with no entry repeated.

Original entry on oeis.org

0, 0, 0, 8, 24, 144, 240, 672, 960, 2000, 2640, 4680, 5880, 9408, 11424, 17024, 20160, 28512, 33120, 45000, 51480, 67760, 76560, 98208, 109824, 137904, 152880, 188552, 207480, 252000, 275520, 330240, 359040, 425408, 460224, 539784, 581400, 675792, 725040, 836000, 893760, 1023120, 1090320, 1240008
Offset: 0

Views

Author

Indranil Ghosh, Dec 13 2016

Keywords

Crossrefs

Cf. A210370 (where the entries can be repeated).

Programs

  • Mathematica
    CoefficientList[Series[8 x^3*(1 + 2 x + 11 x^2 + 4 x^3)/((1 - x)^5*(1 + x)^4), {x, 0, 43}], x] (* Michael De Vlieger, Dec 13 2016 *)
  • PARI
    F(n, {r=0})={my(s=vector(2), v); forvec(y=vector(4, j, [0, n]), for(k=23*!!r, 23, v=numtoperm(4, k); s[1+(y[v[1]]*y[v[4]]-y[v[3]]*y[v[2]])%2]++), 2*!r); return(s)} \\ a(n)=F(n, 0)[2];
    
  • PARI
    concat(vector(3), Vec(8*x^3*(1 + 2*x + 11*x^2 + 4*x^3) / ((1 - x)^5*(1 + x)^4) + O(x^40))) \\ Colin Barker, Dec 13 2016
  • 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!=b  and a!=d and b!=d and c!=a and c!=b and c!=d):
                            if (a*d-b*c)%2==1:
                                s+=1
        return s
    for i in range(0,201):
        print(i, t(i))
    

Formula

From Colin Barker, Dec 13 2016: (Start)
a(n) = (3*n^4 - 8*n^3 - 12*n^2 + 32*n)/8 for n even.
a(n) = (3*n^4 - 4*n^3 - 10*n^2 + 4*n + 7)/8 for n odd.
a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) - 6*a(n-4) + 6*a(n-5) + 4*a(n-6) - 4*a(n-7) - a(n-8) + a(n-9) for n>8.
G.f.: 8*x^3*(1 + 2*x + 11*x^2 + 4*x^3) / ((1 - x)^5*(1 + x)^4).
(End)
Showing 1-5 of 5 results.