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-15 of 15 results.

A277636 Number of 3 X 3 matrices having all elements in {0,...,n} with determinant = permanent.

Original entry on oeis.org

1, 343, 6859, 50653, 226981, 753571, 2048383, 4826809, 10218313, 19902511, 36264691, 62570773, 103161709, 163667323, 251239591, 374805361, 545338513, 776151559, 1083206683, 1485446221, 2005142581, 2668267603, 3504881359, 4549540393, 5841725401, 7426288351
Offset: 0

Views

Author

Indranil Ghosh, Jan 02 2017

Keywords

Comments

a(n) is a perfect cube.

Crossrefs

Cf. A059976 (Number of 3 X 3 singular matrices with all elements in {0,...,n})
Cf. A015237 (Number of 2 X 2 matrices with all elements in {0,...,n} with determinant = permanent )
Cf. A003215.

Programs

  • PARI
    Vec((1 + 336*x + 4479*x^2 + 9808*x^3 + 4479*x^4 + 336*x^5 + x^6) / (1 - x)^7 + O(x^30)) \\ Colin Barker, Jan 02 2017
  • Python
    def a(n):
        return 27*n**6-81*n**5+108*n**4-81*n**3+36*n**2-9*n+1
    

Formula

a(n) = A003215(n-1)^3.
a(n) = (3*n^2 - 3*n + 1)^3.
G.f.: (1 + 336*x + 4479*x^2 + 9808*x^3 + 4479*x^4 + 336*x^5 + x^6) / (1 - x)^7. - Colin Barker, Jan 02 2017

A280058 Number of 2 X 2 matrices with entries in {0,1,...,n} with determinant = permanent with no entries repeated.

Original entry on oeis.org

0, 0, 0, 12, 48, 120, 240, 420, 672, 1008, 1440, 1980, 2640, 3432, 4368, 5460, 6720, 8160, 9792, 11628, 13680, 15960, 18480, 21252, 24288, 27600, 31200, 35100, 39312, 43848, 48720, 53940, 59520, 65472, 71808, 78540, 85680, 93240, 101232, 109668, 118560
Offset: 0

Views

Author

Indranil Ghosh, Dec 25 2016

Keywords

Comments

Consider all Pythagorean triples (X,Y,Z=Y+2) ordered by increasing Z; A005843, A005563, A002522 and A007531 give the X, Y, Z and area A values of related triangles; for n >= 2 altitude h(n) = a(n+1)/A002522(n) or h(n)/2 is irreducible fraction in Q\Z. - Ralf Steiner, Mar 29 2020

Crossrefs

Cf. A000292, A015237 (where the entries can be repeated), A005843, A005563, A002522, A016742, A099761, A007531.

Programs

  • Mathematica
    Table[2*n*(n-1)*(n-2), {n, 0, 50}] (* G. C. Greubel, Dec 25 2016 *)
  • PARI
    for(n=0, 50, print1(2*n*(n-1)*(n-2), ", ")) \\ G. C. Greubel, Dec 25 2016
    
  • PARI
    a(n)=12*binomial(n,3) \\ Charles R Greathouse IV, Dec 25 2016
  • Python
    def t(n):
        s=0
        for a in range(0,n+1):
            for b in range(0,n+1):
                if a!=b:
                    for c in range(0,n+1):
                        if a!=c and b!=c:
                            for d in range(0,n+1):
                                if d!=a and d!=b and d!=c:
                                    if (a*d-b*c)==(a*d+b*c):
                                        s+=1
        return s
    for i in range(0,201):
        print(str(i)+" "+str(t(i)))
    
  • Python
    a = lambda n: 2*n*(n-1)*(n-2) # David Radcliffe, Jun 14 2025
    

Formula

a(n) = 2*((n+1)^3 - 6*(n+1)^2 + 11*(n+1) - 6), for n>0.
a(n) = 2*n*(n-1)*(n-2). - David Radcliffe, Jun 14 2025
a(n) == 0 (mod 12).
From G. C. Greubel, Dec 25 2016: (Start)
G.f.: (12*x^3)/(1 - x)^4.
E.g.f.: 2*x^3*exp(x).
a(n) = 2*n*(n-1)*(n-2).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). (End)
a(n) = 12 * A000292(n-2) for n>1. - Alois P. Heinz, Jan 30 2017
a(n+1) = sqrt(A016742(n)*A099761(n-1)) for n>=2. - Ralf Steiner, Mar 29 2020
From Amiram Eldar, Jun 30 2025: (Start)
Sum_{n>=3} 1/a(n) = 1/8.
Sum_{n>=3} (-1)^(n+1)/a(n) = log(2) - 5/8. (End)

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

Original entry on oeis.org

1, 45, 81, 233, 289, 601, 625, 1113, 1153, 1785, 1681, 2761, 2401, 3577, 3505, 4665, 4225, 6185, 5329, 7673, 6945, 8601, 7921, 11033, 9665, 12265, 11793, 14089, 12769, 18073, 14641, 19945, 17281, 20121, 20593, 23961, 21025, 25417, 24177, 29177, 25921, 35449, 28561, 36233
Offset: 0

Views

Author

Indranil Ghosh, Jan 06 2017

Keywords

Examples

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

Crossrefs

Number of 2 X 2 matrices with all elements in {0,..,n}: A280391 (permanent = determinant * n), A280321 (determinant = permanent * n), A015237 (determinant = permanent) and A016754 (determinant = 2* permanent).

Programs

  • Python
    def t(n):
        s=0
        for a in range(-n,n+1):
            for b in range(-n,n+1):
                for c in range(-n,n+1):
                    for d in range(-n,n+1):
                        if (a*d-b*c)*n==(a*d+b*c):
                            s+=1
        return s
    for i in range(0,156):
        print(t(i))
    
  • Python
    import numpy as np
    def a280417(N):
        if N > 0: yield 1
        if N > 1: yield 45
        if N <= 2: return
        prods = np.zeros(N * N, dtype=np.int32)
        prods[1] = 1 # prods[k] counts integer solutions to x*y = k with 1 <= x,y <= n
        for n in range(2, N):
            n_sq = n * n
            prods[n: n_sq: n] += 2
            prods[n_sq] += 1
            dx = (n + 1) // 2 if n % 2 else n + 1
            dy = (n - 1) // 2 if n % 2 else n - 1
            ad = prods[dx : n_sq : dx]
            bc = prods[dy : dy * ad.shape[0] + 1 : dy]
            yield (4 * n + 1) ** 2 + 8 * int(ad @ bc)
            # (4*n+1)**2 = solutions to a*d = b*c = 0 with -n <= a,b <= n.
            # ad @ bc = solutions to (n-1)*a*d = (n+1)*b*c > 0 with 1 <= a,b <= n.
            # Multiply by 8 to account for all consistent sign changes of a,b,c,d.
    print(list(a280417(44))) # David Radcliffe, May 22 2025

Formula

From David Radcliffe, May 22 2025: (Start)
a(n) = (4*n+1)^2 iff n=0 or n+1 is an odd prime, otherwise a(n) > (4*n+1)^2.
a(n) = 8 * A280391(n) - 8*(2*n+1)^2 + (4*n+1)^2 for n>1. (End)

A357042 The sum of the numbers of the central diamond of the multiplication table [1..k] X [1..k] for k=2*n-1.

Original entry on oeis.org

1, 20, 117, 400, 1025, 2196, 4165, 7232, 11745, 18100, 26741, 38160, 52897, 71540, 94725, 123136, 157505, 198612, 247285, 304400, 370881, 447700, 535877, 636480, 750625, 879476, 1024245, 1186192, 1366625, 1566900, 1788421, 2032640, 2301057, 2595220, 2916725, 3267216, 3648385
Offset: 1

Views

Author

Nicolay Avilov, Sep 18 2022

Keywords

Comments

a(n) is the sum of the elements of the multiplication table, forming the maximum diamond in its center.

Examples

			In the multiplication table [1..3] X [1..3]: a(2) = 2+2+4+6+6 = 20;
In the multiplication table [1..5] X [1..5]: a(3) = 3+4+3+6+6+8+9+8+12+12+15+16+15 = 117.
For n=3, the multiplication table [1..5] X [1..5] and the terms summed are
  *   1  2  3  4  5
   -----------------
  1|        3
  2|     4  6  8
  3|  3  6  9 12 15
  4|     8 12 16
  5|       15
		

Crossrefs

Programs

  • Mathematica
    A357042[n_] := n^2*(2*(n-1)*n + 1); Array[A357042, 50] (* or *)
    LinearRecurrence[{5, -10, 10, -5, 1}, {1, 20, 117, 400, 1025}, 50] (* Paolo Xausa, Oct 03 2024 *)

Formula

a(n) = n^2*(2*n^2 - 2*n + 1).
a(n) = 2*A000583(n) - A015237(n).
From Stefano Spezia, Sep 19 2022: (Start)
G.f.: x*(1 + 15*x + 27*x^2 + 5*x^3)/(1 - x)^5.
a(n) = A000290(n)*A001844(n-1). (End)

A192418 Molecular topological indices of the complete bipartite graphs K_{n,n}.

Original entry on oeis.org

4, 48, 180, 448, 900, 1584, 2548, 3840, 5508, 7600, 10164, 13248, 16900, 21168, 26100, 31744, 38148, 45360, 53428, 62400, 72324, 83248, 95220, 108288, 122500, 137904, 154548, 172480, 191748, 212400
Offset: 1

Views

Author

Eric W. Weisstein, Jul 10 2011

Keywords

Programs

  • Mathematica
    Table[4n^2(2n-1),{n,30}] (* or *) LinearRecurrence[{4,-6,4,-1},{4,48,180,448},30] (* Harvey P. Dale, Apr 08 2018 *)

Formula

a(n) = 4*n^2*(2*n-1).
a(n) = 4*A015237(n).
G.f.: 4*x*(3*x^2+8*x+1)/(x-1)^4. - Colin Barker, Nov 04 2012
a(n) = 2*n * A002939(n). - Bruce J. Nicholson, Oct 14 2019
E.g.f.: 4*exp(x)*x*(1 + 5*x + 2*x^2). - Stefano Spezia, Oct 15 2019
Previous Showing 11-15 of 15 results.