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

A360571 Triangle read by rows: T(n,k) is the k-th Lie-Betti number of the path graph on n-vertices, n >= 1, 0 <= k <= 2*n - 1.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 1, 3, 6, 6, 3, 1, 1, 4, 11, 16, 16, 11, 4, 1, 1, 5, 17, 33, 48, 48, 33, 17, 5, 1, 1, 6, 24, 58, 107, 140, 140, 107, 58, 24, 6, 1, 1, 7, 32, 92, 203, 329, 424, 424, 329, 203, 92, 32, 7, 1, 1, 8, 41, 136, 347, 668, 1039, 1280, 1280, 1039, 668, 347, 136, 41, 8, 1
Offset: 1

Views

Author

Samuel J. Bevins, Feb 12 2023

Keywords

Examples

			Triangle begins:
      k=0  1  2   3   4    5    6    7     8     9   10   11   12  13 14 15
  n=1:  1  1
  n=2:  1  2  2   1
  n=3:  1  3  6   6   3    1
  n=4:  1  4 11  16  16   11    4    1
  n=5:  1  5 17  33  48   48   33   17     5     1
  n=6:  1  6 24  58 107  140  140  107    58    24    6    1
  n=7:  1  7 32  92 203  329  424  424   329   203   92   32    7   1
  n=8:  1  8 41 136 347  668 1039 1280  1280  1039  668  347  136  41  8  1
		

Crossrefs

Cf. A360572 (cycle graph), A088459 (star graph), A360625 (complete graph), A360938 (ladder graph), A360937 (wheel graph).
Cf. A063782 appears to be half the row sum.

Programs

  • SageMath
    from sage.algebras.lie_algebras.lie_algebra import LieAlgebra
    def LieAlgebraFromGraph(G, Module = QQ):
        ''' Takes a graph and a module (optional) as an input.'''
        d = {}
        for edge in G.edges(): # this defines the relations among the generators of the Lie algebra
            key = ("x" + str(edge[0]), "x" + str(edge[1])) #[x_i, x_j]
            value = {"x_" + str(edge[0]) + "" + str(edge[1]): 1} #x{i,j}
            d[key] = value #appending to the dictionary d
        C = LieAlgebras(Module).WithBasis().Graded() #defines the category that we need to work with.
        C = C.FiniteDimensional().Stratified().Nilpotent() #specifies that the algebras we want should be finite, stratified, and nilpotent
        L = LieAlgebra(Module, d, nilpotent=True, category=C)
        def sort_generators_by_grading(lie_algebra, grading_operator): #this sorts the generators by their grading. In this case, V1 are vertices and V2
            generators = lie_algebra.gens()
            grading = [grading_operator(g) for g in generators] #using the grading operator to split the elements into their respective vector spaces
            sorted_generators = [g for _, g in sorted(zip(grading, generators))]
            grouped_generators = {}
            for g in sorted_generators:
                if grading_operator(g) in grouped_generators:
                    grouped_generators[grading_operator(g)].append(g)
                else:
                    grouped_generators[grading_operator(g)] = [g]
            return grouped_generators
        grading_operator = lambda g: g.degree() #defining the grading operator
        grouped_generators = sort_generators_by_grading(L, grading_operator) #evaluating the function to pull the generators apart
        V1 = grouped_generators[1] #elements from vertices
        V2 = grouped_generators[2] #elements from edges
        return L #, V1, V2 #returns the Lie algebra and the two vector spaces
    def betti_numbers(lie_algebra): #this function will calculate the Lie theoretic Betti numbers and return them as a list
        dims = []
        H = lie_algebra.cohomology()
        for n in range(lie_algebra.dimension() + 1):
            dims.append(H[n].dimension())
        return dims
    def A360571_row(n):
        if n == 1: return [1, 1]
        return betti_numbers(LieAlgebraFromGraph(graphs.PathGraph(n)))
    for n in range(1,7): print(A360571_row(n))

A360572 Triangle read by rows: T(n,k) is the k-th Lie-Betti number of the cycle graph on n vertices, n >= 3, 0 <= k <= 2*n.

Original entry on oeis.org

1, 3, 8, 12, 8, 3, 1, 1, 4, 14, 25, 28, 25, 14, 4, 1, 1, 5, 20, 41, 70, 90, 70, 41, 20, 5, 1, 1, 6, 27, 68, 146, 219, 238, 219, 146, 68, 27, 6, 1, 1, 7, 35, 105, 259, 449, 644, 756, 644, 449, 259, 105, 35, 7, 1, 1, 8, 44, 152, 422, 857, 1476, 2012, 2172, 2012, 1476, 857, 422, 152, 44, 8, 1
Offset: 3

Views

Author

Samuel J. Bevins, Feb 12 2023

Keywords

Examples

			Triangle begins:
   k=0 1  2   3   4   5    6    7    8    9   10  11  12  13  14 15 16
n=3  1 3  8  12   8   3    1
n=4  1 4 14  25  28  25   14    4    1
n=5  1 5 20  41  70  90   70   41   20    5    1
n=6  1 6 27  68 146 219  238  219  146   68   27   6   1
n=7  1 7 35 105 259 449  644  756  644  449  259 105  35   7   1
n=8  1 8 44 152 422 857 1476 2012 2172 2012 1476 857 422 152  44  8  1
  ...
		

Crossrefs

Cf. A360571 (path graph), A088459 (star graph), A360625 (complete graph), A360936 (ladder graph), A360937 (wheel graph)

Programs

  • SageMath
    # uses[betti_numbers, LieAlgebraFromGraph from A360571]
    def A360936(n):
        return betti_numbers(LieAlgebraFromGraph(graphs.CycleGraph(n)))

A360936 Triangle read by rows: T(n,k) is the k-th Lie-Betti number of the ladder graph on 2*n vertices, n >= 2, k >= 0.

Original entry on oeis.org

1, 2, 2, 1, 1, 4, 14, 25, 28, 25, 14, 4, 1, 1, 6, 32, 89, 204, 357, 437, 437, 357, 204, 89, 32, 6, 1, 1, 8, 54, 207, 680, 1650, 3201, 5310, 6993, 7508, 6993, 5310, 3201, 1650, 680, 207, 54, 8, 1
Offset: 1

Views

Author

Samuel J. Bevins, Feb 26 2023

Keywords

Examples

			Triangle begins:
   k=0 1  2   3   4    5    6    7    8    9   10   11   12   13  14  15 16
n=1: 1 2  2   1
n=2: 1 4 14  25  28   25   14    4    1
n=3: 1 6 32  89 204  357  437  437  357  204   89   32    6    1
n=4: 1 8 54 207 680 1650 3201 5310 6993 7508 6993 5310 3201 1650 680 207 54
...
		

Crossrefs

Cf. A360571 (path graph), A360572 (cycle graph), A088459 (star graph), A360625 (complete graph), A360937 (wheel graph)

Programs

  • SageMath
    # uses[betti_numbers, LieAlgebraFromGraph from A360571]
    def A360936(n):
        return betti_numbers(LieAlgebraFromGraph(graphs.LadderGraph(n)))

A361044 Triangle read by rows. T(n, k) is the k-th Lie-Betti number of the friendship (or windmill) graph, for n >= 1.

Original entry on oeis.org

1, 3, 8, 12, 8, 3, 1, 1, 5, 24, 60, 109, 161, 161, 109, 60, 24, 5, 1, 1, 7, 48, 168, 483, 1074, 1805, 2531, 2886, 2531, 1805, 1074, 483, 168, 48, 7, 1
Offset: 1

Views

Author

Peter Luschny, Mar 01 2023

Keywords

Comments

The triangle is inspired by Samuel J. Bevins's A360571.
The friendship graph is constructed by joining n copies of the cycle graph C_3 at a common vertex. F_1 is isomorphic to C_3 (the triangle graph) and has 3 vertices, F_2 is the butterfly graph and has 5 vertices and if n > 2 then F_n has 2*n + 1 vertices.

Examples

			The triangle T(n, k) starts:
[1] 1, 3, 8, 12, 8, 3, 1;
[2] 1, 5, 24, 60, 109, 161, 161, 109, 60, 24, 5, 1;
[3] 1, 7, 48, 168, 483, 1074, 1805, 2531, 2886, 2531, 1805, 1074, 483, 168, 48, 7, 1;
		

Crossrefs

Cf. A360571 (path graph), A360572 (cycle graph), A088459 (star graph), A360625 (complete graph), A360936 (ladder graph), A360937 (wheel graph).

Programs

  • SageMath
    from sage.algebras.lie_algebras.lie_algebra import LieAlgebra, LieAlgebras
    def BettiNumbers(graph):
        D = {}
        for edge in graph.edges():
            e = "x" + str(edge[0])
            f = "x" + str(edge[1])
            D[(e, f)] = {e + f : 1}
        C = (LieAlgebras(QQ).WithBasis().Graded().FiniteDimensional().
             Stratified().Nilpotent())
        L = LieAlgebra(QQ, D, nilpotent=True, category=C)
        H = L.cohomology()
        d = L.dimension() + 1
        return [H[n].dimension() for n in range(d)]
    def A361044_row(n):
        return BettiNumbers(graphs.FriendshipGraph(n))
    for n in range(1, 4): print(A361044_row(n))

A361014 Triangle read by rows: T(n,k) is the k-th Lie-Betti number of the hypercube graph on 2^(n-1) vertices, n >= 1, k >= 0.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 1, 4, 14, 25, 28, 25, 14, 4, 1, 1, 8, 64, 258, 986, 2870, 6134, 11586, 18830, 23832, 25078, 23832, 18830, 11586, 6134, 2870, 986, 258, 64, 8, 1
Offset: 1

Views

Author

Samuel J. Bevins, Feb 28 2023

Keywords

Examples

			Triangle begins:
   k=0 1  2   3   4    5    6     7     8     9    10    11    12    13   14
n=1: 1 1
n=2: 1 2  2   1
n=3: 1 4 14  25  28   25   14     4     1
n=4: 1 8 64 258 986 2870 6134 11586 18830 23832 25078 23832 18830 11586 6134
...
		

Crossrefs

Cf. A360571 (path graph), A360572 (cycle graph), A088459 (star graph), A360625 (complete graph), A360936 (ladder graph), A360937 (wheel graph).

Programs

  • SageMath
    # uses[betti_numbers, LieAlgebraFromGraph from A360571]
    def A360936_row(n):
        if n == 1: return [1, 1]
        return betti_numbers(LieAlgebraFromGraph(graphs.CubeGraph(n-1)))

A368135 Triangle read by rows: T(n,k) is the k-th Lie-Betti number of the Fibonacci trees of order n >= 2.

Original entry on oeis.org

1, 2, 2, 1, 1, 4, 11, 16, 16, 11, 4, 1, 1, 7, 33, 95, 212, 344, 444, 444, 344, 212, 95, 33, 7, 1, 1, 12, 90, 454, 1780, 5489, 14036, 29804, 54007, 83404, 111361, 128378, 128378, 111361, 83404, 54007, 29804, 14036, 5489, 1780, 454, 90, 12, 1
Offset: 2

Views

Author

Samuel J. Bevins, Jan 11 2024

Keywords

Examples

			Triangle begins:
  k=0 1  2  3   4   5    6    7    8    9    10    11   12    13   14   15
n=2: 1 2   2  1
n=3: 1 4  11  16   16   11     4     1
n=4: 1 7  33  95  212  344   444   444   344   212     95     33      7      1
n=5: 1 12 90 454 1780 5489 14036 29804 54007 83404 111361 128378 128378 111361 83404 54007 ...
		

Crossrefs

Cf. A360572 (cycle graph), A088459 (star graph), A360625 (complete graph), A360938 (ladder graph), A360937 (wheel graph).

Programs

  • SageMath
    from sage.algebras.lie_algebras.lie_algebra import LieAlgebra, LieAlgebras
    def BettiNumbers(graph):
        D = {}
        for edge in graph.edges():
            e = "x" + str(edge[0])
            f = "x" + str(edge[1])
            D[(e, f)] = {e + f : 1}
        C = (LieAlgebras(QQ).WithBasis().Graded().FiniteDimensional().
             Stratified().Nilpotent())
        L = LieAlgebra(QQ, D, nilpotent=True, category=C)
        H = L.cohomology()
        d = L.dimension() + 1
        return [H[n].dimension() for n in range(d)]
    # Example usage:
    n = 5
    X = BettiNumbers(graphs.FibonacciTree(n))
Showing 1-6 of 6 results.