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

A051286 Whitney number of level n of the lattice of the ideals of the fence of order 2n.

Original entry on oeis.org

1, 1, 2, 5, 11, 26, 63, 153, 376, 931, 2317, 5794, 14545, 36631, 92512, 234205, 594169, 1510192, 3844787, 9802895, 25027296, 63972861, 163701327, 419316330, 1075049011, 2758543201, 7083830648, 18204064403, 46812088751, 120452857976
Offset: 0

Views

Author

Keywords

Comments

A Chebyshev transform of the central trinomial numbers A002426: image of 1/sqrt(1-2x-3x^2) under the mapping that takes g(x) to (1/(1+x^2))*g(x/(1+x^2)). - Paul Barry, Jan 31 2005
a(n) has same parity as Fibonacci(n+1) = A000045(n+1); see A107597. - Paul D. Hanna, May 22 2005
This is the second kind of Whitney numbers, which count elements, not to be confused with the first kind, which sum Mobius functions. - Thomas Zaslavsky, May 07 2008
From Paul Barry, Mar 31 2010: (Start)
Apply the Riordan array (1/(1-x+x^2),x/(1-x+x^2)) to the aerated central binomial coefficients with g.f. 1/sqrt(1-4x^2).
Hankel transform is A174882. (End)
a(n) is the number of lattice paths in L[n]. The members of L[n] are lattice paths of weight n that start at (0,0), end on the horizontal axis and whose steps are of the following four kinds: an (1,0)-step h with weight 1, an (1,0)-step H with weight 2, a (1,1)-step U with weight 2, and a (1,-1)-step D with weight 1. The weight of a path is the sum of the weights of its steps. Example: a(3)=5 because we have hhh, hH, Hh, UD, and DU; a(4)=11 because we have hhhh, hhH, hHh, Hhh, HH, hUD, UhD, UDh, hDU, DhU, and DUh (see the Bona-Knopfmacher reference).
Apparently the number of peakless grand Motzkin paths of length n. - David Scambler, Jul 04 2013
A bijection between L[n] (as defined above) and peakless grand Motzkin paths of length n is now given in arXiv:2002.12874. - Sergi Elizalde, Jul 14 2021
a(n) is also the number of unimodal bargraphs with a centered maximum (i.e., whose column heights are weakly increasing in the left half and weakly decreasing in the right half) and semiperimeter n+1. - Sergi Elizalde, Jul 14 2021
Diagonal of the rational function 1 / ((1 - x)*(1 - y) - (x*y)^2). - Ilya Gutkovskiy, Apr 23 2025
a(n) is the number of rooted ordered trees with node weights summing to n, where the root has weight 0, non-root node weights are in {1,2}, and no nodes have the same weight as their parent node. - John Tyler Rascoe, Jun 10 2025

Examples

			a(3) = 5 because the ideals of size 3 of the fence F(6) = { x1 < x2 > x3 < x4 > x5 < x6 } are x1*x3*x5, x1*x2*x3, x3*x4*x5, x1*x5*x6, x3*x5*x6.
		

Crossrefs

Cf. main diagonal of A125250, column k=2 of A384747.
Cf. A051291, A051292, A078698, A107597, A185828 (log), A174882 (Hankel transf.).

Programs

  • Maple
    seq( sum('binomial(i-k,k)*binomial(i-k,k)', 'k'=0..floor(i/2)), i=0..30 ); # Detlef Pauly (dettodet(AT)yahoo.de), Nov 09 2001
    # second Maple program:
    a:= proc(n) option remember; `if`(n<4, [1$2, 2, 5][n+1],
         ((2*n-1)*a(n-1)+(n-1)*a(n-2)+(2*n-3)*a(n-3)-(n-2)*a(n-4))/n)
        end:
    seq(a(n), n=0..35);  # Alois P. Heinz, Aug 11 2016
  • Mathematica
    Table[Sum[Binomial[n-k,k]^2,{k,0,Floor[n/2]}],{n,0,40}] (* Emanuele Munarini, Mar 01 2011; corrected by Harvey P. Dale, Sep 12 2012 *)
    CoefficientList[Series[1/Sqrt[1-2*x-x^2-2*x^3+x^4], {x, 0, 20}], x] (* Vaclav Kotesovec, Jan 05 2013 *)
    a[n_] := HypergeometricPFQ[ {(1-n)/2, (1-n)/2, -n/2, -n/2}, {1, -n, -n}, 16]; Table[a[n], {n, 0, 29}] (* Jean-François Alcover, Feb 26 2013 *)
  • Maxima
    makelist(sum(binomial(n-k,k)^2,k,0,floor(n/2)),n,0,40);  /* Emanuele Munarini, Mar 01 2011 */
    
  • PARI
    a(n)=polcoeff(1/sqrt((1+x+x^2)*(1-3*x+x^2)+x*O(x^n)),n)
    
  • PARI
    a(n)=sum(k=0,n,binomial(n-k,k)^2) /* Paul D. Hanna */
    
  • PARI
    {a(n)=polcoeff( exp(sum(m=1,n, sum(k=0,m, binomial(2*m,2*k)*x^k) *x^m/m) +x*O(x^n)), n)}  /* Paul D. Hanna, Mar 18 2011 */
    
  • PARI
    {a(n)=local(A=1); A=sum(m=0, n, x^m*sum(k=0, m, binomial(m, k)^2*x^k) +x*O(x^n)); polcoeff(A, n)} \\ Paul D. Hanna, Sep 05 2014
    
  • PARI
    {a(n)=local(A=1+x); A=sum(m=0, n, x^m*sum(k=0, n, binomial(m+k, k)^2*x^k) * (1-x)^(2*m+1) +x*O(x^n)); polcoeff(A, n)} \\ Paul D. Hanna, Sep 05 2014
    
  • PARI
    {a(n)=local(A=1+x); A=sum(m=0, n\2, x^(2*m) * sum(k=0, n, binomial(m+k, k)^2*x^k) +x*O(x^n)); polcoeff(A, n)} \\ Paul D. Hanna, Sep 05 2014
    
  • PARI
    {a(n)=local(A=1+x); A=sum(m=0, n\2, x^(2*m) * sum(k=0, m, binomial(m, k)^2*x^k) / (1-x +x*O(x^n))^(2*m+1) ); polcoeff(A, n)} \\ Paul D. Hanna, Sep 05 2014
    
  • Python
    from sympy import binomial
    def a(n): return sum(binomial(n - k, k)**2 for k in range(n//2 + 1))
    print([a(n) for n in range(31)]) # Indranil Ghosh, Apr 18 2017

Formula

G.f.: 1/sqrt(1 - 2*x - x^2 - 2*x^3 + x^4).
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*(-1)^k*A002426(n-2k). - Paul Barry, Jan 31 2005
From Paul D. Hanna, May 22 2005: (Start)
a(n) = Sum_{k=0..n} C(n-k, k)^2.
Limit_{n->oo} a(n+1)/a(n) = (sqrt(5)+3)/2.
G.f.: 1/sqrt((1+x+x^2)*(1-3*x+x^2)). (End)
a(n) = Sum_{k=0..n} A049310(n, k)^2. - Philippe Deléham, Nov 21 2005
a(n) = Sum_{k=0..n} (C(k,k/2)*(1+(-1)^k)/2) * Sum_{j=0..n} (-1)^((n-j)/2)*C((n+j)/2,j)*((1+(-1)^(n-j))/2)*C(j,k). - Paul Barry, Mar 31 2010
G.f.: exp( Sum_{n>=1} (x^n/n)*Sum_{k=0..n} C(2n,2k)*x^k ). - Paul D. Hanna, Mar 18 2011
Logarithmic derivative equals A185828. - Paul D. Hanna, Mar 18 2011
D-finite with recurrence: n*a(n) - (2*n-1)*a(n-1) - (n-1)*a(n-2) - (2*n-3)*a(n-3) + (n-2)*a(n-4) = 0. - R. J. Mathar, Dec 17 2011
The g.f. A(x) satisfies the differential equation (1-2*x-x^2-2*x^3+x^4)*A'(x) = (1+x+3*x^2-2*x^3)*A(x), from which the recurrence conjectured by Mathar follows. - Emanuele Munarini, Dec 18 2017
a(n) ~ phi^(2*n + 2) / (2 * 5^(1/4) * sqrt(Pi*n)), where phi = A001622 = (1 + sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, Jan 05 2013, simplified Dec 18 2017
From Paul D. Hanna, Sep 05 2014: (Start)
G.f.: Sum_{n>=0} x^n * Sum_{k=0..n} C(n,k)^2 * x^k.
G.f.: Sum_{n>=0} x^n *[Sum_{k>=0} C(n+k,k)^2 * x^k] * (1-x)^(2*n+1).
G.f.: Sum_{n>=0} x^(2*n) * [Sum_{k>=0} C(n+k,k)^2 * x^k].
G.f.: Sum_{n>=0} x^(2*n) * [Sum_{k=0..n} C(n,k)^2 * x^k] /(1-x)^(2n+1).
(End)

A384748 Number of rooted ordered trees with node weights summing to n, where the root has weight 0, non-root node weights are greater than 0, and no nodes have the same weight as their parent node.

Original entry on oeis.org

1, 1, 2, 6, 16, 44, 128, 376, 1114, 3346, 10152, 31028, 95474, 295532, 919446, 2873388, 9015812, 28390466, 89689586, 284173096, 902780060, 2875016084, 9176388532, 29349499212, 94050228650, 301918397716, 970815092346
Offset: 0

Views

Author

John Tyler Rascoe, Jun 09 2025

Keywords

Examples

			a(3) = 6 counts:
  o    o    o      o        o        __o__
  |    |    |     / \      / \      /  |  \
 (3)  (2)  (1)  (1) (2)  (2) (1)  (1) (1) (1)
       |    |
      (1)  (2)
		

Crossrefs

Cf. A000108, A002212, A143330, A384613, A384685, (main diagonal of A384747).

Programs

  • PARI
    b(i,j,k,N) = {if(k>N,1, 1/(1-sum(u=1,j, if(u==i,0,x^u*b(u,j,k+1,N-u+1)))))}
    Dx(N) = {my(x='x+O('x^(N+1))); Vec(1/(1 - sum(i=1,N, b(i,N,1,N)*x^i)))}
    Dx(10)

Extensions

a(14)-a(26) from David Radcliffe, Jun 10 2025

A382096 Number of rooted ordered trees with node weights summing to n, where the root has weight 0, non-root node weights are in {1,2,3}, and no nodes have the same weight as their parent node.

Original entry on oeis.org

1, 1, 2, 6, 15, 39, 110, 308, 869, 2499, 7238, 21086, 61871, 182523, 540830, 1609238, 4805871, 14398559, 43264896, 130347450, 393650751, 1191441349, 3613345360, 10978726634, 33414836743, 101863289331, 310984519412, 950734751040, 2910319385881, 8919643999157, 27368321239074
Offset: 0

Views

Author

John Tyler Rascoe, Jun 08 2025

Keywords

Examples

			a(3) = 6 counts:
  o    o    o      o        o        __o__
  |    |    |     / \      / \      /  |  \
 (3)  (2)  (1)  (1) (2)  (2) (1)  (1) (1) (1)
       |    |
      (1)  (2)
		

Crossrefs

Cf. A000108, A002212, A143330, A384613, A384685, (column k=3 of A384747).

Programs

  • PARI
    b(i,j,k,N) = {if(k>N,1, 1/(1-sum(u=1,j, if(u==i,0,x^u*b(u,j,k+1,N-u+1)))))}
    Gx(k,N) = {my(x='x+O('x^(N+1))); Vec(1/(1-sum(i=1,k, b(i,k,1,N)*x^i)))}
    Gx(3,20)

Formula

G.f.: G(x) = 1/(1 - b_1(x)*x - b_2(x)*x^2 - b_3(x)*x^3) where b_1(x) = 1/(1 - b_2(x)*x^2 - b_3(x)*x^3), b_2(x) = 1/(1 - b_1(x)*x - b_3(x)*x^3), b_3(x) = 1/(1 - b_1(x)*x - b_2(x)*x^2).

A385123 Triangle Read by rows: T(n,k) is the number of rooted ordered trees with n non-root nodes with non-root node labels in {1,..,k} such that all labels appear at least once in all groups of sibling nodes.

Original entry on oeis.org

1, 0, 1, 0, 2, 2, 0, 5, 6, 6, 0, 14, 22, 36, 24, 0, 42, 90, 150, 240, 120, 0, 132, 378, 648, 1560, 1800, 720, 0, 429, 1638, 3318, 8400, 16800, 15120, 5040, 0, 1430, 7278, 18180, 43128, 126000, 191520, 141120, 40320, 0, 4862, 32946, 98502, 238320, 834120, 1905120, 2328480, 1451520, 362880
Offset: 0

Views

Author

John Tyler Rascoe, Jun 18 2025

Keywords

Examples

			Triangle begins:
    k=0    1    2      3     4      5      6     7
 n=0 [1]
 n=1 [0,   1]
 n=2 [0,   2,   2]
 n=3 [0,   5,   6,     6]
 n=4 [0,  14,  22,    36,   24]
 n=5 [0,  42,  90,   150,  240,   120]
 n=6 [0, 132,  378,  648, 1560,  1800,   720]
 n=7 [0, 429, 1638, 3318, 8400, 16800, 15120, 5040]
...
T(3,2) = 6 counts the three leaf permutations of each of the following trees:
      __o__        __o__
     /  |  \      /  |  \
   (1) (1) (2)  (1) (2) (2)
		

Crossrefs

Cf. A000108 (column k=1), A000142 (main diagonal), A385125 (row sums).

Programs

  • PARI
    subsets(S) = {my(s=List()); for(i=0, 2^(#S) -1, my(x=List()); for(j=1,#S, if(bitand(i, 1<<(j-1)), listput(x, S[j]))); listput(s,Vec(x))); Vec(s)}
    C_aB(B) = {my(S = subsets(B)); sum(i=1,#S, (1/(1-x*z*#S[i]))*(-1)^(#B-#S[i]))}
    D(k,N,B) = {if(k>N,1, substpol(C_aB(B),z,1 + D(k+1,N-#B+1,B)))}
    Dx(N,B) = {Vec(1+D(1,N,B)+ O('x^(N+1)))}
    T(max_row) = {my( N = max_row+1, v = vector(N, i, if(i==1, 1, 0))~); for(k=1, N, v=matconcat([v, Dx(N+1, vector(k,i,i))~])); vector(N, n, vector(n, k, v[n, k]))}
    T(8)

A385125 Number of rooted ordered trees with n non-root nodes all labeled with numbers greater than 0 such that the labels of all groups of sibling nodes cover the same initial interval.

Original entry on oeis.org

1, 1, 4, 17, 96, 642, 5238, 50745, 568976, 7256750, 103622742, 1634819518, 28208152974, 528060735100, 10654676857578
Offset: 0

Views

Author

John Tyler Rascoe, Jun 18 2025

Keywords

Examples

			Tree A has sibling node groups whose labels both cover the initial interval (1,2). Tree B has sibling node groups whose labels cover the initial intervals (1,2) and (1,2,3). So tree A is counted under a(5) = 642 while tree B is not.
  A:    __o__     B:    __o__
       /  |  \         /  |  \
     (1) (1) (2)     (3) (1) (2)
     / \             / \
   (1) (2)         (1) (2)
		

Crossrefs

Cf. Row sums of A385123.

Programs

  • PARI
    \\ See A385123 for Dx(N,B)
    Ax(N) = {my( v = vector(N, i, if(i==1, 1, 0))~); for(k=1, N, v=matconcat([v, Dx(N+1, vector(k,i,i))~])); vector(N, n, sum(i=1, n, v[n, i]))}
    Ax(5)

A384937 Number for rooted ordered trees with edge weights summing to n, where edge weights are all greater than zero, and the sequences of edge weights in all downward paths are weakly increasing.

Original entry on oeis.org

1, 1, 3, 9, 30, 103, 372, 1379, 5248, 20356, 80252, 320581, 1295018, 5280967, 21711163, 89890559, 374478935, 1568585095, 6602283315, 27910296899, 118448905668, 504466997897, 2155412350793, 9236401247438, 39686616306747, 170946789568804, 738024717474360
Offset: 0

Views

Author

John Tyler Rascoe, Jun 12 2025

Keywords

Examples

			The following tree with sum of edge weights 13 contains downward paths of edge weights (1), (2,3,4), and (2,3,3) all of which are weakly increasing. So this tree is counted under a(13) = 5280967.
           o
        2 / \ 1
         o   o
      3 / 	
       o
    4 / \ 3	
     o   o
		

Crossrefs

Programs

  • PARI
    w(j,k,N) = {if(k>N,1, 1/(1 - sum(i=j,N, x^i * w(i,k+1,N-i+1))))}
    Ax(N) = {Vec(w(1,1,N)+ O('x^(N+1)))}
    Ax(10)

Formula

G.f.: G_1(x) where G_k(x) = 1/(1 - Sum_{i>=k} x^i * G_i(x)).

A384938 Number for rooted ordered trees with edge weights summing to n, where edge weights are all greater than zero, and the sequences of edge weights in all downward paths are strictly increasing.

Original entry on oeis.org

1, 1, 2, 5, 11, 26, 61, 142, 334, 785, 1845, 4339, 10211, 24030, 56560, 133143, 313433, 737906, 1737275, 4090206, 9630067, 22673482, 53383917, 125691264, 295938451, 696785116, 1640579144, 3862745470, 9094847357, 21413863699, 50419073794, 118712060012, 279508439419
Offset: 0

Views

Author

John Tyler Rascoe, Jun 13 2025

Keywords

Examples

			The following tree with sum of edge weights 15 contains downward paths of edge weights (1), (2,3,4), and (2,3,5) all of which are weakly increasing. So this tree is counted under a(13) = 133143.
           o
        2 / \ 1
         o   o
      3 / 	
       o
    4 / \ 5	
     o   o
		

Crossrefs

Programs

  • PARI
    w(j,k,N) = {if(k>N,1, 1/(1 - sum(i=j+1,N, x^i * w(i,k+1,N-i+1))))}
    Bx(N) = {my(x='x+O('x^(N+1))); Vec(w(0,1,N)+ O('x^(N+1)))}
    Bx(10)

Formula

G.f.: G_0(x) where G_k(x) = 1/(1 - Sum_{i>k} x^i * G_i(x)).
Showing 1-7 of 7 results.