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.

A155069 Expansion of (3 - x - sqrt(1 - 6*x + x^2))/2.

Original entry on oeis.org

1, 1, 2, 6, 22, 90, 394, 1806, 8558, 41586, 206098, 1037718, 5293446, 27297738, 142078746, 745387038, 3937603038, 20927156706, 111818026018, 600318853926, 3236724317174, 17518619320890, 95149655201962, 518431875418926, 2832923350929742, 15521467648875090
Offset: 0

Views

Author

Philippe Deléham, Nov 02 2009

Keywords

Comments

A minor variation of A006318. Unsigned version of A086456 and A103137. The Hankel transform of this sequence is A006125.
a(n) is also the number of "branching configurations" for RNA (see Sankoff, 1985) that have exactly n hairpins. - Lee A. Newberg, Mar 30 2010
a(n) is also the number of ways to insert balanced parentheses into a product of n variables such that each parenthesis pair has 2 or more top-level factors. - Lee A. Newberg, Apr 06 2010
a(n) is also the number of infix expressions with n variables and operators + and - such that there are no redundant parentheses. - Vjeran Crnjak, Apr 25 2020
a(n) is also the number of permutations on n elements that can be obtained with an output-restricted (or input-restricted) deque. (see D. E. Knuth: The Art of Computer Programming, Volume 1, page 539). - Zhujun Zhang, Oct 15 2023

Examples

			From _Lee A. Newberg_, Mar 30 2010: (Start)
For n = 2, the a(2) = 2 branching configurations are ()() and (()()), where each () indicates a hairpin (also termed 1-loop) and each other pair of parentheses indicates a k-loop for k >= 3.
For n = 3, the a(3) = 6 branching configurations are ()()(), (()())(), ()(()()), (()()()), ((()())()), and (()(()())). (End)
When inserting balanced parentheses into the product x^n: For n = 0, the a(0) = 1 possible term is the empty term. For n = 1, the a(1) = 1 possible term is x. For n = 2, the a(2) = 2 possible terms are xx and (xx). For n = 3, the a(3) = 6 possible terms are xxx, (xx)x, x(xx), (xxx), ((xx)x), and (x(xx)). - _Lee A. Newberg_, Apr 06 2010
G.f. = 1 + x + 2*x^2 + 6*x^3 + 22*x^4 + 90*x^5 + 394*x^6 + 1806*x^7 + ...
		

References

  • S. Kitaev, Patterns in Permutations and Words, Springer-Verlag, 2011. see p. 399 Table A.7
  • D. E. Knuth, The Art of Computer Programming, Volume 1, Fundamental Algorithms, section 2.2.1: Stacks, Queues, and Deques.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 25); Coefficients(R!( (3-x-Sqrt(1-6*x+x^2))/2 )); // G. C. Greubel, Jun 08 2020
  • Maple
    seq(coeff(series((3-x -sqrt(1-6*x+x^2))/2, x, n+1), x, n), n = 0..25); # G. C. Greubel, Jun 08 2020
  • Mathematica
    CoefficientList[Series[(3 -x -Sqrt[1-6x+x^2])/2, {x, 0, 25}], x] (* Vincenzo Librandi, Nov 13 2014 *)
  • Maxima
    a(n):=if n<1 then 1 else  sum(binomial(n+i-1,i)* binomial(2*n, n-2*i-1),i,0,(n)/2)/(n); /* Vladimir Kruchinin, Nov 13 2014 */
    
  • Sage
    a = lambda n: catalan_number(n)*hypergeometric([1/2-n/2,1-n/2,n],[n/2+1,n/2+3/2],1)
    print([simplify(a(n)) for n in (0..25)]) # Peter Luschny, Nov 14 2014
    

Formula

G.f.: (3 - x - sqrt(1 -6*x +x^2))/2.
G.f.: 4 / (3 - x + sqrt(1 - 6*x + x^2)). - Michael Somos, Apr 18 2012
a(n) ~ sqrt((sqrt(18)-4)/(4*Pi)) * n^(-3/2) * (3 + sqrt(8))^n, which is, approximately, a(n) ~ 0.1389558648 * n^(-1.5) * 5.828427125^n. - Lee A. Newberg, Apr 06 2010
a(n) ~ (1 + sqrt(2))^(2*n-1) / (2^(3/4)*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Oct 23 2023
a(n) = top left term of M^n, where M = the production matrix:
1, 1, 0, 0, 0, ...
1, 2, 1, 0, 0, ...
1, 2, 2, 1, 0, ...
1, 2, 2, 2, 1, ...
1, 2, 2, 2, 2, 1, ...
...
Top row terms of M^n generates rows of triangle A132372. - Gary W. Adamson, Jul 07 2011
G.f.: A(x)=(3 -x- sqrt(1-6*x+x^2))/2= 2 - G(0); G(k)= 1 + x - 2*x/G(k+1); (continued fraction, 1-step, 1 var.). - Sergei N. Gladkovskii, Jan 04 2012
G.f.: A(x)=(3 -x -sqrt(1-6*x+x^2))/2= G(0); G(k)= := 1 - x/(1 - 2/G(k+1)); (continued fraction, 2-step, 2 var.). - Sergei N. Gladkovskii, Jan 04 2012
D-finite with recurrence: n*a(n) +3*(3-2*n)*a(n-1) +(n-3)*a(n-2)=0. - R. J. Mathar, Jul 24 2012
G.f.: 1 / (1 - x / (1 - x / (1 - 2*x / (1 - x / (1 - 2*x / (1 - x / ... )))))) = 1 + x / (1 - 2*x / (1 - x / (1 - 2*x / (1 - x / (1 - 2*x / (1 - x / ... )))))). - Michael Somos, Jan 03 2013
G.f.: 2 - x - G(0), where G(k)= k+1 - 2*x*(k+1) - 2*x*(k+1)*(k+2)/G(k+1) ; (continued fraction). - Sergei N. Gladkovskii, Jul 14 2013
a(n) = (1/n)*Sum_{i = 0..floor(n/2)} binomial(n+i-1, i)*binomial(2*n, n-2*i-1), n>0, a(0)=1. - Vladimir Kruchinin, Nov 13 2014
a(n) = Catalan(n)*hypergeometric([1/2-n/2, 1-n/2, n], [n/2+1, n/2+3/2], 1). - Peter Luschny, Nov 14 2014
a(0) = 1; a(n) = a(n-1) + Sum_{k=1..n-1} a(k) * a(n-k). - Ilya Gutkovskiy, Apr 11 2021

A033878 Triangular array associated with Schroeder numbers.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 5, 10, 6, 1, 7, 22, 38, 22, 1, 9, 38, 98, 158, 90, 1, 11, 58, 194, 450, 698, 394, 1, 13, 82, 334, 978, 2126, 3218, 1806, 1, 15, 110, 526, 1838, 4942, 10286, 15310, 8558, 1, 17, 142, 778, 3142, 9922, 25150, 50746, 74614, 41586
Offset: 0

Views

Author

Keywords

Comments

Transpose of triangular array A132372. - Michel Marcus, May 02 2015

Examples

			This triangle reads:
1
1  1
1  3   2
1  5   10   6
1  7   22   38   22
1  9   38   98   158   90
1  11  58   194  450   698   394
1  13  82   334  978   2126  3218   1806
1  15  110  526  1838  4942  10286  15310   558
1  17  142  778  3142  9922  25150  50746  74614  41586
		

Crossrefs

Programs

  • PARI
    lgs(n) = if( n<1, 1, sum( k=0, n, 2^k * binomial( n, k) * binomial( n, k-1)) / n) /* A006318 */
    T(n, k) = if (k>n, 0, if (k==0, 1, if (n==0, 1, if ((n==k), lgs(n-1), T(n,k-1) + T(n-1,k-1) + T(n-1,k)))));
    tabl(nn) = {for (n=0, nn, for (m=0, n, print1(T(n, m), ", ");); print(););} \\ Michel Marcus, May 02 2015
    
  • Python
    from functools import cache
    @cache
    def T(n: int, k: int) -> int:
        if n <  0: return 0
        if k == 0: return 1
        if n == k: return sum(T(n-1, k) for k in range(n))
        return T(n, k-1) + T(n-1, k-1) + T(n-1, k)
    for n in range(10):
        print([T(n, k) for k in range(n+1)])  # Peter Luschny, Dec 26 2024

Extensions

Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 23 2003

A238112 Expansion of g.f.: (1-5*x+2*x^2+(2*x-1)*sqrt(x^2-6*x+1))/(4*x).

Original entry on oeis.org

0, 0, 1, 5, 23, 107, 509, 2473, 12235, 61463, 312761, 1609005, 8355423, 43741635, 230614773, 1223414481, 6525975315, 34981856303, 188341400945, 1018043304661, 5522585343271, 30056208280091, 164066282507501, 898029800045945, 4927810473507803, 27103503645610567, 149393131346947369, 825093297608481533
Offset: 0

Views

Author

N. J. A. Sloane, Mar 04 2014

Keywords

Comments

Number of bracketed decomposable averaging words of degree n.
a(n) is the number of dissections of a convex (n+2)-sided polygon by nonintersecting diagonals such that at least one of the dividing diagonals passes through a chosen vertex. - Muhammed Sefa Saydam, Mar 01 2025

Examples

			From _Peter Bala_, Jan 31 2020: (Start)
The sequence may be obtained from the matrix multiplication of A132372 and the sequence of squares A000290:
   / 1           \   / 1 \       /  1 \
  |  1   1        | |  4  |     |   5  |
  |  2   3  1     | |  9  |  =  |  23  |
  |  6  10  5  1  | | 16  |     | 107  |
  | ...           | | ... |     | ...  | (End)
		

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 30); [0,0] cat Coefficients(R!( (1-5*x+2*x^2+(2*x-1)*Sqrt(x^2-6*x+1))/(4*x))); // Marius A. Burtea, Feb 02 2020
  • Maple
    CD := n -> LegendreP(n,3): a := n -> ((3*n^2+3*n-6)*CD(n+2) + (34*n^2+52*n+18)* CD(n) + (20-23*n^2-21*n)*CD(n+1))/(4*(n^3-n)):
    [0,0,seq(a(n), n=2..27)]; # Peter Luschny, Feb 01 2020
  • Mathematica
    Join[{0, 0},Table[1/4(2GegenbauerC[n,-(1/2),3]-GegenbauerC[1+n,-(1/2),3]),{n, 2, 30}]] (* Benedict W. J. Irwin, Sep 26 2016 *)
    CoefficientList[Series[(1-5*x+2*x^2+(2*x-1)*Sqrt[x^2-6*x+1])/(4*x), {x, 0, 30}], x] (* Vaclav Kotesovec, Sep 27 2016 *)
  • PARI
    my(x='x+O('x^50)); concat([0,0], Vec((1-5*x+2*x^2+(2*x-1)*sqrt(x^2-6*x+1))/(4*x))) \\ G. C. Greubel, Jun 01 2017
    

Formula

a(n) ~ (1+2*sqrt(2))* sqrt(3*sqrt(2)-4) * (3+2*sqrt(2))^n / (4*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Mar 05 2014
a(n) = (2*GegenbauerC(n,-1/2,3)-GegenbauerC(n+1,-1/2,3))/4, n>1. - Benedict W. J. Irwin, Sep 26 2016
D-finite with recurrence: (n+1)*a(n) +(-8*n+5)*a(n-1) +(13*n-32)*a(n-2) +2*(-n+4)*a(n-3)=0. - R. J. Mathar, Jan 25 2020
From Peter Bala, Jan 31 2019: (Start)
O.g.f.: A(x) = x^2*(1 + x*S(x))^2/(1 - x*S(x))^3 = x^2*S(x)^2/(1 - x*S(x)), where S(x) = 1 + 2*x + 6*x^2 + 22*x^3 + ... is the o.g.f. for the large Schröder numbers A006318.
Modulo offset differences, the sequence is given by the matrix-by-vector product A132372 * A000290 (regarded as a column vector). See the example below. (End)
a(n) = ((3*n^2+3*n-6)*CD(n+2) + (34*n^2+52*n+18)*CD(n) + (20-23*n^2-21*n)* CD(n+1))/(4*(n^3-n)) where CD(n) are the central Delannoy numbers A001850, for n >= 2. - Peter Luschny, Feb 01 2020
From Peter Bala, Feb 20 2020: (Start)
a(n) = (1/2)*( A006318(n) - 2*A006318(n-1) ) for n >= 1.
O.g.f.: A(x) = (1/2)*( (1 - 2*x)*S(x) - 1 ), where S(x) is the o.g.f. for the large Schröder numbers A006318. (End)
a(n) = A001003(n-1) + 2*Sum_{k=1..n-2} ( A001003(k) * A001003 (n-k-1) ) for n >= 2. - Muhammed Sefa Saydam, Mar 01 2025

A167656 Triangle T(n,k), 0<=k<=n, read by rows given by [1,1,2,1,2,1,2,1,2,1,2,...] DELTA [1,1,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, 1, 2, 4, 2, 6, 16, 14, 4, 22, 68, 78, 40, 8, 90, 304, 410, 284, 104, 16, 394, 1412, 2122, 1776, 896, 256, 32, 1806, 6752, 10966, 10468, 6496, 2592, 608, 64, 8558, 33028, 56870, 59832, 43016, 21376, 7072, 1408, 128, 41586, 164512, 296498, 336252
Offset: 0

Views

Author

Philippe Deléham, Nov 08 2009

Keywords

Examples

			Triangle begins:
1 ;
1,1 ;
2,4,2 ;
6,16,14,4 ;
22,68,78,40,8 ;
90,304,410,284,104,16 ;
...
		

Crossrefs

Formula

T(n,0) = T(n-1,0) + T(n-1,1).
T(n,1) = T(n-1,0) + 3*T(n-1,1) + T(n-1,2).
T(n,k) = 2*T(n-1,k-1) + 3*T(n-1,k) + T(n-1,k+1) for k>1.
Showing 1-4 of 4 results.