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

A051292 Whitney number of level n of the lattice of the ideals of the crown of size 2 n.

Original entry on oeis.org

2, 1, 1, 4, 9, 21, 52, 127, 313, 778, 1941, 4863, 12228, 30837, 77967, 197574, 501657, 1275987, 3250618, 8292703, 21182509, 54169966, 138674031, 355343469, 911347684, 2339226871, 6008781637, 15445521202, 39728258103, 102248793573, 263306364822, 678411876729, 1748800672089
Offset: 0

Views

Author

Keywords

Comments

A Chebyshev transform of the central binomial numbers A002426 under the mapping that takes g(x) to ((1-x^2)/(1+x^2))g(x/(1+x^2)). Starts 1,1,1,4,9,21,... - Paul Barry, Jan 31 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

Examples

			a(3) = 4 because the ideals of size 3 of the crown C(3) = { x1 < x2 > x3 < x4 > x5 < x6 > x1 } are x1*x2*x3, x3*x4*x5, x1*x6*x5, x1*x3*x5.
		

Crossrefs

Cf. A051291, A051286. Main diagonal of A205810.

Programs

  • Maple
    f:= gfun:-rectoproc({n*(n-3)*a(n)-(2*n-1)*(n-3)*a(n-1)+(-n^2+4*n-5)*a(n-2)-(n-1)*(2*n-7)*a(n-3)+(n-1)*(n-4)*a(n-4) = 0, a(0) = 2, a(1) = 1, a(2) = 1, a(3) = 4},a(n),remember):
    map(f, [$0..40]); # Robert Israel, Dec 06 2017
    a := n -> `if`(n=0,2,2*add(((1+(-1)^(n-k)))*n*k*binomial((n+k)/2, k)^2*1/((n+k))^2, k=0..n)): seq(a(n), n=0..32); # Leonid Bedratyuk, Dec 07 2017
  • Mathematica
    CoefficientList[Series[(1-x^2+Sqrt[1-2*x-x^2-2*x^3+x^4])/Sqrt[1-2*x-x^2-2*x^3+x^4], {x, 0, 20}], x] (* Vaclav Kotesovec, Jan 05 2013 *)
  • PARI
    x='x+O('x^66); Vec( (1-x^2+sqrt(1-2*x-x^2-2*x^3+x^4))/sqrt(1-2*x-x^2-2*x^3+x^4) ) \\ Joerg Arndt, May 04 2013

Formula

G.f.: (1 - t^2 + sqrt(1 - 2*t - t^2 - 2*t^3 + t^4))/sqrt(1 - 2*t - t^2 - 2*t^3 + t^4).
a(n) = sum{k=0..floor(n/2), (n/(n-k))C(n-k, k)*(-1)^k*sum{i=0..floor((n-2k)/2), C(n-2k, 2i)C(2i, i)}}; a(n)=sum{k=0..floor(n/2), (n/(n-k))C(n-k, k)*(-1)^k*A002426(n-2k)}. - Paul Barry, Jan 31 2005
Conjecture: n*(n-3)*a(n) - (2*n-1)*(n-3)*a(n-1) + (-n^2+4*n-5)*a(n-2) - (n-1)*(2*n-7)*a(n-3) + (n-1)*(n-4)*a(n-4) = 0. - R. J. Mathar, Nov 30 2012
Conjecture confirmed using the differential equation (2*x^2-x+2)*y(x) + (4*x^4-5*x^3-x^2+x-2)*y'(x) + (x^5-2*x^4-x^3-2*x^2+x)*y''(x) - 2*x^2 + x - 2 = 0 satisfied by the g.f. - Robert Israel, Dec 06 2017
a(n) ~ 5^(1/4)*((1+sqrt(5))/2)^(2*n)/(2*sqrt(Pi*n)). - Vaclav Kotesovec, Jan 05 2013
a(n) = 2n Sum_{k=0..n}(1+(-1)^(n-k))*C((n+k)/2,k)^2*k/((n+k))^2 for n > 0. - Leonid Bedratyuk, Dec 06 2017

A077419 Largest Whitney number of Fibonacci lattices J(Z_n).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 5, 7, 11, 17, 26, 40, 63, 97, 153, 238, 376, 587, 931, 1458, 2317, 3640, 5794, 9124, 14545, 22951, 36631, 57904, 92512, 146461, 234205, 371281, 594169, 943045, 1510192, 2399460, 3844787, 6114555, 9802895, 15603339, 25027296
Offset: 0

Views

Author

N. J. A. Sloane, Jan 19 2003

Keywords

Comments

A051286 and A051291, interleaved. a(n) is the maximal element in the n-th row of A079487 or A123245 and in the (n+2)-th row of A078807 or A078808. - Andrey Zabolotskiy, Sep 21 2017

Programs

  • Maple
    with(FormalPowerSeries): with(LREtools): # requires Maple 2022
    gf:= (1 + 2*x + 2*x^4 - x^6 - (1-x^2)*sqrt(1 - 2*x^2 - x^4 - 2*x^6 + x^8))/(2*x*sqrt(1 - 2*x^2 - x^4 - 2*x^6 + x^8));
    re:= FindRE(gf,x,a(n));
    inits:= {seq(a(i-1)=[1,1,1,2,2,3,5,7,11,17,26,40,63,97, 153][i],i=1..14)};
    rm:=  (n+1)*a(n) +(n-2)*a(n-1) +2*(-n+1)*a(n-2) +2*(-n+1)*a(n-3) +(-n-3)*a(n-4) +(-n+8)*a(n-5) +2*(-n+6)*a(n-6) +2*(-n+7)*a(n-7) +(n-9)*a(n-8) +(n-10)*a(n-9)=0;
    minre:= MinimalRecurrence(re, a(n), inits); minrm:= MinimalRecurrence(rm, a(n), inits); # shows that Mathar's recurrence is equivalent
    f:= REtoproc(re,a(n),inits); seq(f(n),n=0..40); # Georg Fischer, Oct 22 2022
  • Mathematica
    gf[x_] = (1 + 2 x + 2 x^4 - x^6 - (1 - x^2) Sqrt[1 - 2 x^2 - x^4 - 2 x^6 + x^8])/(2 x Sqrt[1 - 2 x^2 - x^4 - 2 x^6 + x^8]);
    Table[SeriesCoefficient[gf[x], {x, 0, n}], {n, 0, 40}] (* Hugo Pfoertner, Oct 22 2022 *)

Formula

G.f.: (1 + 2 x + 2 x^4 - x^6 - (1-x^2) sqrt(1 - 2 x^2 - x^4 - 2 x^6 + x^8) )/(2x sqrt(1 - 2 x^2 - x^4 - 2 x^6 + x^8)). - Emanuele Munarini, Mar 05 2007
a(n) ~ phi^(n+2) / (5^(1/4) * sqrt(2*Pi*n)), where phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, Sep 22 2017
D-finite with recurrence: (n+1)*a(n) +(n-2)*a(n-1) +2*(-n+1)*a(n-2) +2*(-n+1)*a(n-3) +(-n-3)*a(n-4) +(-n+8)*a(n-5) +2*(-n+6)*a(n-6) +2*(-n+7)*a(n-7) +(n-9)*a(n-8) +(n-10)*a(n-9)=0. - R. J. Mathar, Nov 19 2019

Extensions

More terms from Emanuele Munarini, Mar 05 2007

A201631 a(n) is the number of Fibonacci meanders of length m*n and central angle 360/m degrees where m = 2.

Original entry on oeis.org

1, 3, 6, 13, 30, 70, 167, 405, 992, 2450, 6090, 15214, 38165, 96069, 242530, 613811, 1556856, 3956316, 10070871, 25674210, 65541142, 167517654, 428635032, 1097874434, 2814611701, 7221917871, 18544968768, 47655572191, 122544150258, 315313433594, 811792614547
Offset: 1

Views

Author

Peter Luschny, Jan 15 2012

Keywords

Comments

Empirically the partial sums of A051291. - Sean A. Irvine, Jul 13 2022
The above conjecture was proved by Baril et al., which also give a formal definition of the Fibonacci meanders and describe a bijection with a certain class of peakless grand Motzkin paths of length n. - Peter Luschny, Mar 16 2023

Examples

			a(3) = 6 = card({100001, 100100, 110000, 111001, 111100, 111111}).
		

Crossrefs

Programs

  • Maple
    A201631 := n -> add(A202411(k),k=0..2*n-1): seq(A201631(i),i=1..9);
    # Alternative, using the g.f. of Baril et al.:
    S := (x^2 - x + 1 - R)/((x - 1)*(x^2 - x - 1 + R)*R):
    R := (((x - 3)*x + 1)*(x^2 + x + 1))^(1/2): ser := series(S, x, 33):
    seq(coeff(ser, x, n), n = 1..31); # Peter Luschny, Mar 16 2023
    # Using a recurrence:
    a := proc(n) option remember; if n < 5 then return [0, 1, 3, 6, 13][n + 1] fi;
    (n*(2*n - 1)*(2*n - 3)*(n - 5)*a(n - 5) - (n - 4)*(2*n - 1)^2*(3*n - 5)*a(n - 4) + (2*n - 5)*(n - 3)*(2*n^2 - 3*n + 2)*a(n - 3) - (2*n - 3)*(n - 2)*(2*n^2 - 3*n + 5)*a(n - 2) + (3*n - 4)*(2*n - 1)*(2*n - 5)*(n - 1)*a(n - 1))/(n*(2*n - 3)*(2*n - 5)*(n - 1)) end: seq(a(n), n = 1..31); # Peter Luschny, Mar 16 2023
  • Mathematica
    a[n_] := Sum[A202411[k], {k, 0, 2 n - 1}];
    Array[a, 31] (* Jean-François Alcover, Jun 29 2019 *)

Formula

a(n) = Sum_{k=0..2n-1} A202411(k).
a(n) = [x^n] (x^2 - x + 1 - R)/((x - 1)*(x^2 - x - 1 + R) * R), where R = (((x - 3)*x + 1)*(x^2 + x + 1))^(1/2). (This is Theorem 21 in Baril et al.) - Peter Luschny, Mar 16 2023
Showing 1-4 of 4 results.