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.

A025235 a(n) = (1/2)*s(n+2), where s = A014431.

Original entry on oeis.org

1, 1, 3, 7, 21, 61, 191, 603, 1961, 6457, 21595, 72975, 249085, 857013, 2970007, 10356323, 36311633, 127937649, 452738867, 1608426647, 5734534629, 20511509549, 73583105007, 264687136235, 954482676217, 3449853902761, 12495597328011, 45349353908383
Offset: 0

Views

Author

Keywords

Comments

Number of lattice paths in the first quadrant from (0,0) to (n,0) using only steps H=(1,0), U=(1,1) and D=(1,-1), where the U steps come in two colors: red (R) and green (G) (i.e., Motzkin paths with the up steps in two colors). E.g., a(3)=7 because we have HHH, HRD, HGD, RDH, GDH, RHD and GHD. - Emeric Deutsch, Dec 25 2003
Equals inverse binomial transform of A071356: (1, 2, 6, 20, 72, ...). - Gary W. Adamson, Sep 03 2010
a(n) is the number of increasing unary-binary trees with associated permutation that avoids 231. For more information about increasing unary-binary trees with an associated permutation, see A245888. - Manda Riehl, Aug 07 2014

Examples

			x + x^2 + 3*x^3 + 7*x^4 + 21*x^5 + 61*x^6 + 191*x^7 + 603*x^8 + 1961*x^9 + ...
a(4) = 21 since the top row of M^4 = (21, 11, 7, 1, 1)
		

Crossrefs

Programs

  • Mathematica
    Join[{1}, Table[Sum[2^(k - 1)*Binomial[n + 1, k]*Binomial[n - k + 1, k - 1]/(n + 1), {k,0,n}], {n,0,50}]] (* G. C. Greubel, Jan 27 2017 *)
    a[n_] := Hypergeometric2F1[1/2 - n/2, -n/2, 2, 8];
    Table[a[n], {n, 0, 27}] (* Peter Luschny, Mar 18 2018 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( serreverse( x / (1 + x + 2*x^2 + x * O(x^n))), n+1))} /* Michael Somos, Jul 12 2003 */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 - x - sqrt(1 - 2*x -7*x^2 + x^3 * O(x^n)) ) / 4, n+2))} /* Michael Somos, Mar 31 2007 */
    
  • PARI
    {a(n) = local(A); if( n<0, 0, A = x * O(x^n); n! * simplify( polcoeff( exp(x + A) * besseli(1, 2*x * quadgen(8) + A), n)))} /* Michael Somos, Mar 31 2007 */

Formula

a(n) = Sum_{k=0..n} 2^(k-1)*binomial(n+1, k)*binomial(n-k+1, k-1)/(n+1 ). - Len Smiley
G.f.: (1 - x - sqrt(1 - 2*x - 7*x^2)) / (4*x^2). - Michael Somos, Jun 08 2000
G.f. (for offset 1) is series reversion of x / (1 + x + 2*x^2). - Michael Somos, Jul 12 2003
a(n) = Sum_{k=0..n} binomial(n, k)*2^(k/2)*C(k/2)*(1+(-1)^k)/2, where C(n)=A000108(n). - Paul Barry, Dec 22 2003
E.g.f.: exp(x)*BesselI(1, 2*sqrt(2)*x)/(sqrt(2)*x). - Vladeta Jovovic, Mar 31 2004
From Gary W. Adamson, Feb 21 2012: (Start)
a(n) is the leftmost term in the top row of M^n, M is an infinite square production matrix as follows:
1, 1, 0, 0, 0, 0, ...
2, 0, 1, 0, 0, 0, ...
2, 2, 0, 1, 0, 0, ...
2, 2, 2, 0, 1, 0, ...
2, 2, 2, 2, 0, 1, ...
2, 2, 2, 2, 2, 0, ...
2, 2, 2, 2, 2, 2, ...
... (End)
From Vaclav Kotesovec, Sep 29 2012: (Start)
a(n) ~ (1+2*sqrt(2))^(n+3/2)/(2*sqrt(Pi)*2^(3/4)*n^(3/2)).
Recurrence: (n+2)*a(n) = (2*n+1)*a(n-1) + 7*(n-1)*a(n-2). (End)
a(n) = hypergeom([-n/2, (1-n)/2], [2], 8). - Peter Luschny, May 28 2014
G.f.: 1/(1 - x - 2*x^2/(1 - x - 2*x^2/(1 - x - 2*x^2/(1 - x - 2*x^2/(1 - ....))))), a continued fraction. - Ilya Gutkovskiy, May 26 2017