|
| |
|
|
A082582
|
|
Expansion of (1 + x^2 - sqrt( 1 - 4*x + 2*x^2 + x^4)) / (2*x) in powers of x.
|
|
4
| |
|
|
1, 1, 1, 2, 5, 13, 35, 97, 275, 794, 2327, 6905, 20705, 62642, 190987, 586219, 1810011, 5617914, 17518463, 54857506, 172431935, 543861219, 1720737981, 5459867166, 17369553427, 55391735455, 177040109419, 567019562429, 1819536774089
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,4
|
|
|
COMMENTS
| a(n) = number of Dyck paths of semilength n with no UUDD. See A025242 for a bijection between paths avoiding DDUU versus UUDD.
|
|
|
FORMULA
| G.f.: (1 + x^2 - sqrt( 1 - 4*x + 2*x^2 + x^4)) / (2*x) = 2 /(1 + x^2 + sqrt( 1 - 4*x + 2*x^2 + x^4)).
G.f. A(x) satisfies the equation 0 = 1 - (1 + x^2) * A(x) + x * A(x)^2. - Michael Somos Jul 22 2003
G.f. A(x) satisfies A(x) = 1 / (1 + x^2 - x * A(x)). - Michael Somos Mar 28 2011
G.f. A(x) = 1 / (1 + x^2 - x / (1 + x^2 - x / (1 + x^2 - ... ))) continued fraction. - Michael Somos Jul 01 2011
Series reversion of x * A(x) is x * A007477(-x). - Michael Somos Jul 22 2003
|
|
|
EXAMPLE
| 1 + x + x^2 + 2*x^3 + 5*x^4 + 13*x^5 + 35*x^6 + 97*x^7 + 275*x^8 + ...
a(3)=2 because the only Dyck paths of semilength 3 with no UUDD in them are UDUDUD and UUDUDD (the nonqualifying ones being UDUUDD, UUDDUD and UUUDDD). - Emeric Deutsch (deutsch(AT)duke.poly.edu), Jan 27 2003
|
|
|
MATHEMATICA
| a[0]=1; a[n_Integer]:=a[n]=a[n-1]+Sum[a[k]*a[n-1-k], {k, 2, n-1}]; Table[a[n], {n, 0, 40}] (*From Vladimir Joseph Stephan Orlovsky, Mar 30 2011*)
a[ n_] := SeriesCoefficient[ 2 / (1 + x^2 + Sqrt[1 - 4 x + 2 x^2 + x^4]), {x, 0, n}] (* Michael Somos Jul 01 2011 *)
|
|
|
PROG
| (PARI) {a(n) = polcoeff( (1 + x^2 - sqrt( 1 - 4*x + 2*x^2 + x^4 + x^2 * O(x^n))) / 2, n+1)} /* Michael Somos Jul 22 2003 */
(PARI) {a(n) = if( n<0, 0, polcoeff( 2 /(1 + x^2 + sqrt( 1 - 4*x + 2*x^2 + x^4 + x * O(x^n))), n))} /* Michael Somos Jul 01 2011 */
(PARI) {a(n) = local(A); if( n<0, 0, A = O(x); for( k = 0, n, A = 1 / (1 + x^2 - x * A)); polcoeff( A, n))} /* Michael Somos Mar 28 2011 */
|
|
|
CROSSREFS
| Apart from initial term, same as A025242.
See A086581 for Dyck paths avoiding DDUU.
Sequence in context: A007689 A085281 * A086581 A059027 A025198 A037247
Adjacent sequences: A082579 A082580 A082581 * A082583 A082584 A082585
|
|
|
KEYWORD
| easy,nonn
|
|
|
AUTHOR
| Emanuele Munarini (munarini(AT)mate.polimi.it), May 07 2003
|
|
|
EXTENSIONS
| Example moved from A086581 to here.
|
| |
|
|