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

A093768 Positive first differences of the rows of triangle A088459, which enumerates symmetric Dyck paths.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 8, 6, 1, 4, 15, 20, 20, 1, 5, 24, 45, 75, 50, 1, 6, 35, 84, 189, 210, 175, 1, 7, 48, 140, 392, 588, 784, 490, 1, 8, 63, 216, 720, 1344, 2352, 2352, 1764, 1, 9, 80, 315, 1215, 2700, 5760, 7560, 8820, 5292, 1, 10, 99, 440, 1925, 4950, 12375, 19800
Offset: 0

Views

Author

Paul D. Hanna, Apr 16 2004

Keywords

Comments

Suggested by Bozydar Dubalski (slawb(AT)atr.bydgoszcz.pl). Related to walks on a square lattice: main diagonal forms A005558, secondary diagonals form A005559, A005560, A005561, A005562, A005563.
Apparently row-reversed version of A052174. - R. J. Mathar, Feb 03 2025

Examples

			1;
1, 1;
1, 2, 3;
1, 3, 8, 6;
1, 4, 15, 20, 20;
1, 5, 24, 45, 75, 50;
1, 6, 35, 84, 189, 210, 175;
		

Crossrefs

Cf. A088459, A005558-A005562, A005563 (column 3), A005564 (column 4), A005565 (column 5), A005566 (row sums).

Programs

  • Maple
    A093768 := proc(n,k)
        if k = 0 then
            A088459(n,k);
        else
            A088459(n,k)-A088459(n,k-1);
        end if;
    end proc:
    seq(seq(A093768(n,k),k=0..n-1),n=1..10) ; # R. J. Mathar, Apr 02 2017
  • Mathematica
    T[n_, k_] := Binomial[n + 1, Ceiling[k/2]]*Binomial[n, Floor[k/2]] - Binomial[n + 1, Ceiling[(k - 1)/2]]*Binomial[n, Floor[(k - 1)/2]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* G. C. Greubel, Oct 25 2017 *)
  • PARI
    {T(n,k) =binomial(n+1,ceil(k/2))*binomial(n,floor(k/2)) -binomial(n+1,ceil((k-1)/2))*binomial(n,floor((k-1)/2))}

Formula

T(n, k) = C(n+1, ceiling(k/2))*C(n, floor(k/2)) - C(n+1, ceiling((k-1)/2))*C(n, floor((k-1)/2)) for n>=k>=0.

A301566 a(n) = Sum_{k=1..n-1} k*A088459(n, k).

Original entry on oeis.org

0, 2, 15, 82, 405, 1891, 8554, 37850, 164985, 710893, 3036726, 12880847, 54331550, 228089538, 953811972, 3975120810, 16519242465, 68474376025, 283211458750, 1169062910873, 4817380232522, 19819870885230, 81429323786460, 334120527783367, 1369374666890230
Offset: 1

Views

Author

Eric W. Weisstein, Mar 23 2018

Keywords

Comments

a(n)/binomial(2*n-1,n-1) gives the mean distance of the n-odd graph.
Sum can be given in closed form involving four terms each consisting of a product of binomials and 3F2's.

Crossrefs

Programs

  • Mathematica
    Table[Sum[k Binomial[n, Ceiling[k/2]] Binomial[n - 1, Floor[k/2]], {k, n - 1}], {n, 20}]
  • PARI
    T(n, k) = binomial(n, ceil(k/2))*binomial(n-1, k\2);
    a(n) = sum(k=1, n-1, k*T(n,k)); \\ Altug Alkan, Mar 23 2018

Formula

a(n) = 2*A136328(n)/binomial(2*n-1,n-1). - Andrew Howroyd, Mar 24 2018

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))

A088855 Triangle read by rows: number of symmetric Dyck paths of semilength n with k peaks.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 4, 2, 1, 1, 3, 6, 6, 3, 1, 1, 3, 9, 9, 9, 3, 1, 1, 4, 12, 18, 18, 12, 4, 1, 1, 4, 16, 24, 36, 24, 16, 4, 1, 1, 5, 20, 40, 60, 60, 40, 20, 5, 1, 1, 5, 25, 50, 100, 100, 100, 50, 25, 5, 1, 1, 6, 30, 75, 150, 200, 200, 150, 75, 30, 6, 1, 1, 6, 36, 90, 225, 300, 400, 300, 225, 90, 36, 6, 1
Offset: 1

Views

Author

Emeric Deutsch, Nov 24 2003

Keywords

Comments

Rows 2, 4, 6, ... give A088459.
Diagonal sums are in A088518(n-1). - Philippe Deléham, Jan 04 2009
Row sums are in A001405(n). - Philippe Deléham, Jan 04 2009
Subtriangle (1 <= k <= n) of triangle T(n,k), 0 <= k <= n, read by rows, given by A101455 DELTA A056594 := [0,1,0,-1,0,1,0,-1,0,1,0,-1,0,...] DELTA [1,0,-1,0,1,0,-1,0,1,0,-1,0,1,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Jan 03 2009
Also, number of symmetric noncrossing partitions of an n-set with k blocks. - Andrew Howroyd, Nov 15 2017
From Roger Ford, Oct 17 2018: (Start)
T(n,k) = t(n+2,d) where t(n,d) is the number of different semi-meander arch depth listings with n top arches and with d the depth of the deepest embedded arch.
Examples: /\ semi-meander with 5 top arches
//\\ /\ 2 arches are at depth=0 (no covering arches)
///\\\ //\\ 2 arches are at depth=1 (1 covering arch)
(0)(1)(2) 1 arch is at depth=2 (2 covering arches)
2, 2, 1 is the listing for this t(5,2)
/\ semi-meander with 5 top arches
/ \ (0)(1)
/\ /\ //\/\\ 3, 2 is the listing for this t(5,1)
a(6,5) = t(8,5)= 3 {2,1,1,1,2,1; 2,1,2,1,1,1; 3,1,1,1,1,1} (End)

Examples

			Triangle begins:
  1;
  1,  1;
  1,  1,  1;
  1,  2,  2,   1;
  1,  2,  4,   2,   1;
  1,  3,  6,   6,   3,    1;
  1,  3,  9,   9,   9,    3,    1;
  1,  4, 12,  18,  18,   12,    4,    1;
  1,  4, 16,  24,  36,   24,   16,    4,    1;
  1,  5, 20,  40,  60,   60,   40,   20,    5,    1;
  1,  5, 25,  50, 100,  100,  100,   50,   25,    5,    1;
  1,  6, 30,  75, 150,  200,  200,  150,   75,   30,    6,   1;
  1,  6, 36,  90, 225,  300,  400,  300,  225,   90,   36,   6,   1;
  1,  7, 42, 126, 315,  525,  700,  700,  525,  315,  126,  42,   7,  1;
  1,  7, 49, 147, 441,  735, 1225, 1225, 1225,  735,  441, 147,  49,  7, 1;
  1,  8, 56, 196, 588, 1176, 1960, 2450, 2450, 1960, 1176, 588, 196, 56, 8, 1;
  ...
a(6,2)=3 because we have UUUDDDUUUDDD, UUUUDDUUDDDD, UUUUUDUDDDDD, where
U=(1,1), D=(1,-1).
		

Crossrefs

Cf. A001405 (row sums), A088459, A088518 (diagonal sums).
Column 2 is A008619, column 3 is A002620, column 4 is A028724, column 5 is A028723, column 6 is A028725, column 7 is A331574.

Programs

  • Magma
    [(&*[Binomial(Floor((n-j)/2), Floor((k-j)/2)): j in [0..1]]): k in [1..n], n in [1..15]]; // G. C. Greubel, Apr 08 2022
    
  • Mathematica
    T[n_, k_] := Binomial[Quotient[n-1, 2], Quotient[k-1, 2]]*Binomial[ Quotient[n, 2], Quotient[k, 2]];
    Table[T[n, k], {n,13}, {k,n}]//Flatten (* Jean-François Alcover, Jun 07 2018 *)
  • PARI
    T(n,k) = binomial((n-1)\2, (k-1)\2)*binomial(n\2, k\2); \\ Andrew Howroyd, Nov 15 2017
    
  • Sage
    def A088855(n,k): return product(binomial( (n-j)//2, (k-j)//2 ) for j in (0..1))
    flatten([[A088855(n,k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Apr 08 2022

Formula

T(n, k) = binomial(floor(n'), floor(k'))*binomial(ceiling(n'), ceiling(k')), where n' = (n-1)/2, k' = (k-1)/2.
G.f.: 2*u/(u*v + sqrt(x*y*u*v)) - 1, where x = 1+z+t*z, y = 1+z-t*z, u = 1-z+t*z, v = 1-z-t*z.
Triangle T(n,k), 0 <= k <= n, given by A101455 DELTA A056594 begins: 1; 0,1; 0,1,1; 0,1,1,1; 0,1,2,2,1; 0,1,2,4,2,1; 0,1,3,6,6,3,1; 0,1,3,9,9,9,3,1; ... - Philippe Deléham, Jan 03 2009
From G. C. Greubel, Apr 08 2022: (Start)
T(n, n-k+1) = T(n, k).
T(2*n-1, n) = A018224(n-1), n >= 1.
T(2*n, n) = A005566(n-1), n >= 1. (End)

Extensions

Keyword:tabl added Philippe Deléham, Jan 25 2010

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)))

A360937 Triangle read by rows: T(n, k) is the k-th Lie-Betti number of a wheel graph on n vertices, for n >= 3 and k >= 0.

Original entry on oeis.org

1, 3, 8, 12, 8, 3, 1, 1, 4, 20, 56, 84, 90, 84, 56, 20, 4, 1, 1, 5, 32, 108, 212, 371, 547, 547, 371, 212, 108, 32, 5, 1, 1, 6, 45, 171, 442, 1081, 2025, 2616, 2722, 2616, 2025, 1081, 442, 171, 45, 6, 1, 1, 7, 60, 258, 842, 2489, 5440, 8855, 12955, 16785, 16785, 12955, 8855, 5440, 2489, 842, 258, 60, 7, 1
Offset: 3

Views

Author

Samuel J. Bevins, Feb 26 2023

Keywords

Examples

			Triangle T(n, k) 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 20  56  84   90   84   56   20    4    1
n=5: 1 5 32 108 212  371  547  547  371  212  108   32   5   1
n=6: 1 6 45 171 442 1081 2025 2616 2722 2616 2025 1081 442 171 45  6  1
...
		

Crossrefs

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

Programs

  • SageMath
    # uses[betti_numbers, LieAlgebraFromGraph from A360571]
    def A360937_row(n):
        return betti_numbers(LieAlgebraFromGraph(graphs.WheelGraph(n)))
    for n in range(3, 7): print(A360937_row(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)))

A362007 Fourth Lie-Betti number of a path graph on n vertices.

Original entry on oeis.org

0, 0, 3, 16, 48, 107, 203, 347, 551, 828, 1192, 1658, 2242, 2961, 3833, 4877, 6113, 7562, 9246, 11188, 13412, 15943, 18807, 22031, 25643, 29672, 34148, 39102, 44566, 50573, 57157, 64353, 72197, 80726, 89978, 99992, 110808
Offset: 1

Views

Author

Samuel J. Bevins, Apr 05 2023

Keywords

Comments

Sequence T(n,4) in A360571.

Crossrefs

Cf. A360571 (path graph triangle), A088459 (second Lie-Betti number of path graphs), A361230.

Programs

  • Python
    def A362007(n):
        values = [0,0,3]
        for i in range(4, n+1):
            result = (i**4 + 18*i**3 - 97*i**2 + 174*i - 168)/24
            values.append(int(result))
        return values

Formula

a(1) = a(2) = 0, a(3) = 3, a(n) = (n^4 + 18*n^3 - 97*n^2 + 174*n - 168)/24 for n >= 4.
a(n) = A011379(n-3) + A006002(n-4) + A001105(n-3) + A056106(n-2) + A000027(n-3) + A000332(n-3) + A000217(n-5) + A000027(n-4) for n >= 5.
From Stefano Spezia, Mar 02 2025: (Start)
G.f.: x^2*(3 + x - 2*x^2 - 3*x^3 + 3*x^4 - x^5)/(1 - x)^5.
E.g.f.: (12*(6 + 4*x + x^2) - exp(x)*(72 - 24*x - 36*x^2 - 28*x^3 - x^4))/24. (End)

Extensions

a(34) and Python program corrected by Robert C. Lyons, Apr 17 2023

A192835 Molecular topological indices of the odd graphs.

Original entry on oeis.org

0, 24, 540, 12040, 258300, 5258484, 102834732, 1948929840, 36099037260, 656717973340, 11782163004612, 208991112900024, 3673025551895700, 64051241252342400, 1109647124772841800, 19114937411113617120, 327669959548309223340, 5592728044559732561100
Offset: 1

Views

Author

Eric W. Weisstein, Jul 11 2011

Keywords

Comments

The n-odd graph is a vertex transitive graph. The number of nodes at distance k from a specified node for k in 1..n-1 is given by A088459(n,k). Ignore the second half of each row (k>=n). - Andrew Howroyd, May 11 2017

Crossrefs

Cf. A088459.

Programs

  • Mathematica
    b[n_] := Sum[Binomial[n-1, i]*Binomial[n, i]*Min[2*i, 2*(n-i)-1], {i, 1, n - 1}];
    a[1] = 0; a[n_] := Binomial[2*n - 1, n]*n*(n + b[n]);
    Array[a, 18] (* Jean-François Alcover, Oct 02 2017, after Andrew Howroyd *)
  • PARI
    b(n)=sum(i=1,n-1,binomial(n-1,i)*binomial(n,i)*min(2*i,2*(n-i)-1));
    a(n)=if(n<2,0,binomial(2*n-1,n)*n*(n+b(n))); \\ Andrew Howroyd, May 11 2017

Formula

a(n) = binomial(2*n-1, n)*n * (n + Sum_{k=1..n-1} k*A088459(n,k)) for n>1. - Andrew Howroyd, May 11 2017

Extensions

a(8)-a(18) from Andrew Howroyd, May 11 2017

A247644 Triangle formed from the odd-numbered rows of A088855.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 4, 2, 1, 1, 3, 9, 9, 9, 3, 1, 1, 4, 16, 24, 36, 24, 16, 4, 1, 1, 5, 25, 50, 100, 100, 100, 50, 25, 5, 1, 1, 6, 36, 90, 225, 300, 400, 300, 225, 90, 36, 6, 1, 1, 7, 49, 147, 441, 735, 1225, 1225, 1225, 735, 441, 147, 49, 7, 1, 1, 8, 64, 224, 784, 1568, 3136, 3920, 4900, 3920, 3136, 1568, 784, 224, 64, 8, 1
Offset: 1

Views

Author

N. J. A. Sloane, Sep 23 2014

Keywords

Comments

The rows give the coefficients in the numerator polynomials of the o.g.f.s for the columns of triangle A055898. - Georg Fischer, Aug 16 2021
They also occur (with a factor 2*x) in the numerator polynomials of the difference A157052-A157074. - Georg Fischer, Sep 27 2021

Examples

			Triangle begins:
1,
1,1,1,
1,2,4,2,1,
1,3,9,9,9,3,1,
1,4,16,24,36,24,16,4,1,
1,5,25,50,100,100,100,50,25,5,1,
1,6,36,90,225,300,400,300,225,90,36,6,1,
1,7,49,147,441,735,1225,1225,1225,735,441,147,49,7,1,
1,8,64,224,784,1568,3136,3920,4900,3920,3136,1568,784,224,64,8,1,
...
		

Crossrefs

Cf. A088459 (even numbered rows of A088855).

Programs

  • Mathematica
    row[n_] := CoefficientList[Sum[Binomial[n, k]^2 *x^(2*k), {k, 0, n}] + Sum[Binomial[n, k]*Binomial[n, k - 1]* x^(2*k - 1), {k, 0, n}], x];
    Table[row[n], {n, 0, 8}] // Flatten (* Jean-François Alcover, Jun 07 2018 *)
  • PARI
    T(n, k) = binomial((n-1)\2, (k-1)\2)*binomial(n\2, k\2); \\ A088855
    row(n) = vector(2*n-1, k, T(2*n-1, k)); \\ Michel Marcus, Sep 27 2021

Extensions

Row n=8 corrected by Jean-François Alcover, Jun 07 2018
Offset changed to 1 by Georg Fischer, Sep 27 2021
Showing 1-10 of 15 results. Next