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.

Previous Showing 11-18 of 18 results.

A210371 Number of 2 X 2 matrices with all elements in {0,1,...,n} and nonnegative even determinant.

Original entry on oeis.org

1, 10, 48, 112, 285, 490, 968, 1448, 2465, 3410, 5280, 6904, 10021, 12610, 17400, 21312, 28321, 33866, 43704, 51336, 64661, 74898, 92416, 105680, 128297, 145234, 173712, 194928, 230333, 256410, 299776
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

a(n) = (A210369(n) + A059306(n))/2. - Chai Wah Wu, Nov 27 2016

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

Original entry on oeis.org

0, 0, 17, 48, 172, 320, 713, 1112, 2016, 2840, 4561, 6056, 8964, 11400, 15977, 19648, 26400, 31744, 41257, 48664, 61620, 71512, 88689, 101680, 123800, 140376, 168449, 189232, 224108, 249840, 292545
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

a(n) = (A210369(n) - A059306(n))/2. - Chai Wah Wu, Nov 27 2016

Extensions

Offset corrected by Chai Wah Wu, Nov 27 2016

A064276 Number of 2 X 2 singular integer matrices with elements from {0,...,n} up to row and column permutation.

Original entry on oeis.org

1, 5, 13, 25, 42, 62, 90, 118, 155, 195, 243, 287, 352, 404, 472, 548, 629, 697, 797, 873, 986, 1094, 1202, 1294, 1443, 1559, 1687, 1823, 1984, 2100, 2296, 2420, 2597, 2769, 2937, 3125, 3366, 3514, 3702, 3906, 4167, 4331, 4611, 4783, 5040, 5320, 5548
Offset: 0

Views

Author

Vladeta Jovovic, Sep 24 2001

Keywords

Examples

			There are 5 binary singular matrices up to row and column permutation:
[0 0] [1 0] [1 1] [1 0] [1 1]
[0 0] [0 0] [0 0] [1 0] [1 1].
		

Crossrefs

Formula

a(n) = (A059306(n)+(n+1)*(2*n+3))/4.

Extensions

More terms from David Wasserman, Jul 16 2002

A064368 Number of 2 X 2 symmetric singular matrices with entries from {0,...,n}.

Original entry on oeis.org

1, 4, 7, 10, 15, 18, 21, 24, 29, 36, 39, 42, 47, 50, 53, 56, 65, 68, 75, 78, 83, 86, 89, 92, 97, 108, 111, 118, 123, 126, 129, 132, 141, 144, 147, 150, 163, 166, 169, 172, 177, 180, 183, 186, 191, 198, 201, 204, 213, 228, 239, 242, 247, 250, 257, 260, 265, 268
Offset: 0

Views

Author

Vladeta Jovovic, Sep 27 2001

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := p^Floor[e/2]; a[0] = 0; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; With[{max = 100}, 1 + Range[0, max] + 2 * Accumulate[Array[a, max + 1, 0]]] (* Amiram Eldar, Nov 07 2024 *)
  • PARI
    a(n) = n + 1 + 2*sum(k=1, n, sumdiv(k, d, issquare(d)*eulerphi(sqrtint(d)))) \\ Michel Marcus, Jun 17 2013

Formula

a(n) = n + 1 + 2*Sum_{k=1..n} Sum_{d^2|k} phi(d), where phi = Euler totient function A000010.
a(n) ~ (n/zeta(2)) * (log(n) + 3*gamma - 1 + zeta(2) - 2*zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 07 2024

A210290 Number of 2 X 2 matrices with all elements in {0,1,...,n} and nonnegative determinant.

Original entry on oeis.org

1, 13, 56, 160, 369, 733, 1328, 2216, 3505, 5285, 7680, 10792, 14809, 19813, 26024, 33600, 42721, 53549, 66384, 81336, 98761, 118821, 141784, 167888, 197561, 230917, 268352, 310176, 356753, 408285, 465376, 528088, 597049, 672533, 754944, 844744, 942425
Offset: 0

Views

Author

Clark Kimberling, Mar 19 2012

Keywords

Comments

See A210000 for a guide to related sequences.

Crossrefs

Programs

  • Mathematica
    a = 0; 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]
    c1[n_, m_] := c1[n, m] = Sum[c[n, k], {k, 0, m}]
    Table[c1[n, n^2], {n, 0, z1}]   (* A210290 *)

Formula

a(n) = ((n+1)^4 + A059306(n))/2. - Andrew Howroyd, Apr 28 2020

Extensions

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

A278348 Number of 2 X 2 singular integer matrices with elements from {0,...,n} with no elements repeated.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 16, 16, 32, 40, 72, 72, 136, 136, 184, 248, 304, 304, 408, 408, 536, 632, 712, 712, 920, 968, 1064, 1168, 1360, 1360, 1664, 1664, 1848, 2008, 2136, 2328, 2696, 2696, 2840, 3032, 3432, 3432, 3880, 3880, 4200, 4592, 4768, 4768, 5336, 5456, 5824
Offset: 0

Views

Author

Indranil Ghosh, Nov 18 2016

Keywords

Comments

If p is prime then a(p) = a(p-1). - Robert G. Wilson v, Nov 20 2016

Crossrefs

Cf. A059306 (where in the matrices each element can be present multiple times).

Programs

  • C
    See Greathouse link.
  • Mathematica
    f[n_] := f[n] = Block[{a = 1, b, c, s = 0}, While[b = a + 1; a < n + 1, While[c = b + 1; b < n + 1, While[c < n + 1, If[a != b && a != c && a != n && b != c && b != n && c != n && a*n == b*c, s++]; c++]; b++]; a++]; 8 s + f[n - 1]]; f[0] = 0; Array[f, 51] (* or *)
    g[n_] := g[n] = Block[{c = 0, k = 1}, While[k < n, c += Count[ Times @@@ Select[ Tuples[ Rest@ Most@ Divisors[k*n], 2], #[[1]] < #[[2]] < n &], k*n]; k++]; c]; 8*Accumulate[ Array[g, 51]] (* much faster but both are recursive *) (* Robert G. Wilson v, Nov 20 2016 *)
  • PARI
    try(a,b,c,n)=my(d=b*c/a); denominator(d)==1 && d<=n && d!=a && d!=b && d!=c
    a(n)=2*sum(a=3,n, sum(b=2,a-1, sum(c=1,b-1, try(a,b,c,n) + try(c,a,b,n) + try(b,a,c,n)))) \\ Charles R Greathouse IV, Nov 20 2016
    
  • Python
    def p(n):
        s=0
        for a in range(n+1):
            for b in range(n+1):
                for c in range(n+1):
                    for d in range(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:
                                s+=1
        return s
    for i in range(101):
        print(str(i)+" "+str(p(i)))
    

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

Original entry on oeis.org

1, 13, 38, 79, 136, 209, 302, 407, 536, 681, 846, 1015, 1240, 1441, 1678, 1951, 2240, 2505, 2854, 3151, 3552, 3945, 4326, 4687, 5216, 5657, 6110, 6615, 7192, 7649, 8342, 8831, 9472, 10105, 10702, 11407, 12272, 12857, 13526, 14279, 15224
Offset: 0

Views

Author

Clark Kimberling, Mar 18 2012

Keywords

Comments

See A210000 for a guide to related sequences.

Crossrefs

Programs

  • Mathematica
    a = 0; b = n; z1 = 40;
    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]
    c1[n_, m_] := c1[n, m] = Sum[c[n, k], {k, 0, 1}]
    Table[c1[n, 1], {n, 0, z1}]    (* A209991 *)

Formula

A064363 Number of 2 X 2 regular integer matrices with elements from {0,...,n} up to row and column permutation.

Original entry on oeis.org

0, 2, 14, 51, 133, 289, 547, 954, 1546, 2380, 3508, 5005, 6915, 9347, 12353, 16028, 20468, 25790, 32054, 39427, 47965, 57833, 69155, 82082, 96682, 113192, 131720, 152429, 175467, 201075, 229305, 260492, 294700, 332182, 373138, 417751, 466201
Offset: 0

Views

Author

Vladeta Jovovic, Sep 25 2001

Keywords

Examples

			There are 2 binary regular matrices up to row and column permutation:
[1 0] [1 1]
[0 1] [1 0].
		

Crossrefs

Programs

  • Mathematica
    A059306[0] = 1; A059306[n_] := Table[{w, x, y, z} /. {ToRules[ Reduce[0 <= x <= n && 0 <= y <= n && 0 <= z <= n && w*z - x*y == 0, {x, y, z}, Integers]]}, {w, 0, n}] // Flatten[#, 1] & // Length; a[n_] := ((n + 1)*(n^3 + 3*n^2 + 4*n + 1) - A059306[n])/4; Table[Print[an = a[n]]; an, {n, 0, 36}] (* Jean-François Alcover, Nov 26 2013 *)

Formula

a(n) = ((n+1)*(n^3+3*n^2+4*n+1)-A059306(n))/4.
Previous Showing 11-18 of 18 results.