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-3 of 3 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

A211034 Number of 2 X 2 matrices having all elements in {0,1,...,n} and determinant = 1 (mod 3).

Original entry on oeis.org

0, 3, 24, 52, 164, 384, 592, 1131, 1944, 2628, 4128, 6144, 7744, 10955, 15000, 18100, 23988, 31104, 36432, 46179, 57624, 66052, 81056, 98304, 110848, 132723, 157464, 175284, 205860, 240000, 264400, 305723, 351384, 383812, 438144, 497664, 539712, 609531
Offset: 0

Views

Author

Clark Kimberling, Mar 30 2012

Keywords

Comments

Also, the number of 2 X 2 matrices having all elements in {0,1,...,n} and determinant = 2 (mod 3). A211033(n) + 2*A211034(n)=n^4 for n>0. For a guide to related sequences, see A210000.

Crossrefs

Programs

  • Mathematica
    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, 3 k], {k, -2*n^2, 2*n^2}]
    v[n_] := v[n] = Sum[c[n, 3 k + 1], {k, -2*n^2, 2*n^2}]
    w[n_] := w[n] = Sum[c[n, 3 k + 2], {k, -2*n^2, 2*n^2}]
    Table[u[n], {n, 0, z1}]   (* A211033 *)
    Table[v[n], {n, 0, z1}]   (* A211034 *)
    Table[w[n], {n, 0, z1}]   (* A211034 *)
    LinearRecurrence[{1, 0, 4, -4, 0, -6, 6, 0, 4, -4, 0, -1, 1}, {0, 3, 24, 52, 164, 384, 592, 1131, 1944, 2628, 4128, 6144, 7744}, 60] (* Vincenzo Librandi, Nov 29 2016 *)
  • Python
    from _future_ import division
    def A211034(n):
        x,y,z = n//3 + 1, (n-1)//3 + 1, (n-2)//3 + 1
        return x**2*y**2 + 2*x**2*y*z + x**2*z**2 + 2*x*y**3 + 6*x*y**2*z + 6*x*y*z**2 + 2*x*z**3 + 2*y**3*z + 2*y*z**3 # Chai Wah Wu, Nov 28 2016

Formula

From Chai Wah Wu, Nov 28 2016: (Start)
a(n) = a(n-1) + 4*a(n-3) - 4*a(n-4) - 6*a(n-6) + 6*a(n-7) + 4*a(n-9) - 4*a(n-10) - a(n-12) + a(n-13) for n > 12.
G.f.: -x*(4*x^9 + 20*x^8 + 59*x^7 + 109*x^6 + 96*x^5 + 136*x^4 + 100*x^3 + 28*x^2 + 21*x + 3)/((x - 1)^5*(x^2 + x + 1)^4).
If r = floor(n/3)+1, s = floor((n-1)/3)+1 and t = floor((n-2)/3)+1, then:
a(n) = r^2*s^2 + 2*r^2*s*t + r^2*t^2 + 2*r*s^3 + 6*r*s^2*t + 6*r*s*t^2 + 2*r*t^3 + 2*s^3*t + 2*s*t^3.
If n == 0 mod 3, then a(n) = 4*n^2*(2*n^2 + 6*n + 3)/27.
If n == 1 mod 3, then a(n) = (8*n^4 + 28*n^3 + 33*n^2 + 16*n - 4)/27.
If n == 2 mod 3, then a(n) = 8*(n + 1)^4/27. (End)

A210698 Number of 2 X 2 matrices having all terms in {1,...,n} and determinant = 0 (mod 3).

Original entry on oeis.org

1, 8, 33, 90, 209, 528, 889, 1432, 2673, 3802, 5297, 8448, 11025, 14216, 20625, 25546, 31393, 42768, 51145, 60824, 79233, 92394, 107297, 135168, 154657, 176392, 216513, 244090, 274481, 330000, 367641, 408728, 483153, 533050, 587089
Offset: 1

Views

Author

Clark Kimberling, Apr 01 2012

Keywords

Comments

A210698(n)+2*A211071(n)=n^4.
For a guide to related sequences, see A210000.

Crossrefs

Programs

  • Mathematica
    a = 1; b = n; z1 = 45;
    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, 3 k], {k, -2*n^2, 2*n^2}]
    v[n_] := v[n] = Sum[c[n, 3 k + 1], {k, -2*n^2, 2*n^2}]
    w[n_] := w[n] = Sum[c[n, 3 k + 2], {k, -2*n^2, 2*n^2}]
    Table[u[n], {n, 1, z1}] (* A210698 *)
    Table[v[n], {n, 1, z1}] (* A211071 *)
    Table[w[n], {n, 1, z1}] (* A211071 *)
    LinearRecurrence[{1, 0, 4, -4, 0, -6, 6, 0, 4, -4, 0, -1, 1}, {1, 8, 33, 90, 209, 528, 889, 1432, 2673, 3802, 5297, 8448, 11025}, 40] (* Vincenzo Librandi, Dec 01 2016 *)
  • Python
    from _future_ import division
    def A210698(n):
        if n % 3 == 0:
            return 11*n**4//27
        elif n % 3 == 1:
            return (11*n**4 - 8*n**3 + 6*n**2 + 4*n + 14)//27
        else:
            return (11*n**4 - 16*n**3 + 24*n**2 + 32*n + 8)//27 # Chai Wah Wu, Nov 30 2016

Formula

From Chai Wah Wu, Nov 30 2016: (Start)
a(n) = a(n-1) + 4*a(n-3) - 4*a(n-4) - 6*a(n-6) + 6*a(n-7) + 4*a(n-9) - 4*a(n-10) - a(n-12) + a(n-13) for n > 13.
G.f.: x*(-x^11 - 9*x^10 - 23*x^9 - 115*x^8 - 109*x^7 - 139*x^6 - 219*x^5 - 91*x^4 - 53*x^3 - 25*x^2 - 7*x - 1)/((x - 1)^5*(x^2 + x + 1)^4).
If r = floor(n/3), s = floor((n-1)/3)+1 and t = floor((n-2)/3)+1, then:
a(n) = r^4 + 4*r^3*s + 4*r^3*t + 4*r^2*s^2 + 8*r^2*s*t + 4*r^2*t^2 + s^4 + 6*s^2*t^2 + t^4.
If n == 0 mod 3, then a(n) = 11*n^4/27.
If n == 1 mod 3, then a(n) = (11*n^4 - 8*n^3 + 6*n^2 + 4*n + 14)/27.
If n == 2 mod 3, then a(n) = (11*n^4 - 16*n^3 + 24*n^2 + 32*n + 8)/27. (End)
Showing 1-3 of 3 results.