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.

A032357 Convolution of Catalan numbers and powers of -1.

Original entry on oeis.org

1, 0, 2, 3, 11, 31, 101, 328, 1102, 3760, 13036, 45750, 162262, 580638, 2093802, 7601043, 27756627, 101888163, 375750537, 1391512653, 5172607767, 19293659253, 72188904387, 270870709263, 1019033438061, 3842912963391, 14524440108761
Offset: 0

Views

Author

Keywords

Comments

Absolute value of the alternating sum of Catalan Numbers. - Alexander Adamchuk, Jul 03 2006
Sums of two consecutive terms are a(n-1) + a(n) = 1, 2, 5, 14, 42, ... = A000108(n) (Catalan Numbers). The prime p divides a((p-3)/2) for p = 11, 19, 29, 31, 41, 59, 61, 71, ... = A045468 (Primes congruent to {1, 4} mod 5). Prime p divides a(2*p+1) for p = 5, 11, 19, 29, 31, 41, 59, 61, 71, ... = A038872 (Primes congruent to {0, 1, 4} mod 5). Also odd primes where 5 is a square mod p. - Alexander Adamchuk, Jul 03 2006
Hankel transform is F(2*n+1), where F = A000045. - Paul Barry, Jul 22 2008
Equals INVERTi transform of A000958. - Gary W. Adamson, Apr 10 2009
Inverse binomial transform of A002212. - Philippe Deléham, Sep 17 2009
Number of singleton and plus-decomposable (2143, 2413, 3142)-avoiding permutations with no +bonds (ascents by 1), with offset 1. Equivalently, number of (2143, 2413, 3142)-avoiding permutations that start with 1 or end with n (top entry). E.g., 132 and 213 for n = 3; 1324, 1432, 3214 for n = 4. - Alexander Burstein, May 22 2015

Crossrefs

Programs

  • Maple
    rec:= (n+1)*a(n) +3*(-n+1)*a(n-1) +2*(-2*n+1)*a(n-2)=0:
    A:= gfun:-rectoproc({rec,a(0)=1,a(1)=0},a(n),remember):
    seq(A(n),n=0..50); # Robert Israel, May 22 2015
  • Mathematica
    Table[Sum[(-1)^(k+n)*CatalanNumber[k],{k,0,n}],{n,0,60}] (* Alexander Adamchuk, Jul 03 2006 *)
    Round@Table[(-1)^n/GoldenRatio + CatalanNumber[n + 1] Hypergeometric2F1[1, n + 3/2, n + 3, -4], {n, 0, 20}] (* Round is equivalent to FullSimplify here, but is much faster - Vladimir Reshetnikov, Oct 02 2016 *)
    Table[(CatalanNumber[n] (2 + (n + 1) Hypergeometric2F1[1, -n, 1/2, 5/4]) - (-1)^n)/2, {n, 0, 20}] (* Vladimir Reshetnikov, Oct 03 2016 *)
  • Sage
    def A032357():
        f, c, n = 1, 1, 1
        while True:
            yield f
            n += 1
            c = c * (4*n - 6) // n
            f = c - f
    a = A032357()
    print([next(a) for  in range(27)]) # _Peter Luschny, Nov 30 2016

Formula

G.f.: c(x)/(1 + x), where c(x) is the g.f. for the Catalan numbers A000108.
a(n) = Sum_{k=0..n} (-1)^(n-k)*C(k), where C(k) = A000108(k).
a(n) = ((-1)^(n+1) - binomial(2*(n+1), n+1)*Sum_{k=0..n+1} (-5)^k*binomial(n+1, k)/binomial(2*k, k))/2.
a(n) = C(2*n, n)/(n+1) - a(n-1) = A000108(n) - a(n-1) with a(0) = 1. - Labos Elemer, Apr 26 2003
Conjecture: (n+1)*a(n) + 3*(-n+1)*a(n-1) + 2*(-2*n+1)*a(n-2) = 0. - R. J. Mathar, Nov 30 2012
Conjecture is true since the g.f. satisfies (x - 3*x^2 - 4*x^3)*g'(x) + (1 - 6*x^2)*g(x) = 1. - Robert Israel, May 22 2015
a(n) = (-1)^n/A001622 + A000108(n+1)*hypergeom([1, n + 3/2], [n + 3], -4). - Vladimir Reshetnikov, Oct 02 2016
a(n) ~ 2^(2*n + 2) / (5*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Oct 03 2016
a(n) = (A000108(n) * (2 + (n + 1)*hypergeom([1,-n], [1/2], 5/4)) - (-1)^n)/2. - Vladimir Reshetnikov, Oct 03 2016

Extensions

More terms from Christian G. Bower, Apr 15 1998
More terms from Alexander Adamchuk, Jul 03 2006

A167477 Expansion of (1-3x+5x^2-x^3)/(1-3x+x^2)^2.

Original entry on oeis.org

1, 3, 12, 44, 149, 479, 1487, 4503, 13386, 39226, 113641, 326173, 928957, 2628459, 7395624, 20708264, 57739517, 160391483, 444068171, 1225831551, 3374848806, 9268963318, 25401364177, 69472849849, 189661024249, 516904018899
Offset: 0

Views

Author

Paul Barry, Nov 04 2009

Keywords

Comments

Hankel transform of A033297 (when this starts 1,1,4,...).

Programs

  • Mathematica
    LinearRecurrence[{6, -11, 6, -1}, {1, 3, 12, 44}, 100] (* G. C. Greubel, Jun 13 2016 *)

Formula

a(n) = 4*A001871(n-1) - A001871(n) + A001519(n+2). - R. J. Mathar, Jun 28 2011

A168377 Riordan array (1/(1 + x), x*c(x)), where c(x) is the o.g.f. of Catalan numbers A000108.

Original entry on oeis.org

1, -1, 1, 1, 0, 1, -1, 2, 1, 1, 1, 3, 4, 2, 1, -1, 11, 10, 7, 3, 1, 1, 31, 32, 21, 11, 4, 1, -1, 101, 100, 69, 37, 16, 5, 1, 1, 328, 329, 228, 128, 59, 22, 6, 1, -1, 1102, 1101, 773, 444, 216, 88, 29, 7, 1, 1, 3760, 3761, 2659, 1558, 785, 341, 125, 37, 8, 1
Offset: 0

Views

Author

Philippe Deléham, Nov 24 2009

Keywords

Examples

			Triangle T(n,k) (with rows n >= 0 and columns k = 0..n) begins:
   1;
  -1,   1;
   1,   0,   1;
  -1,   2,   1,  1;
   1,   3,   4,  2,  1;
  -1,  11,  10,  7,  3,  1;
   1,  31,  32, 21, 11,  4, 1;
  -1, 101, 100, 69, 37, 16, 5, 1;
  ...
From _Philippe Deléham_, Sep 14 2014: (Start)
Production matrix begins:
  -1, 1
   0, 1, 1
   0, 1, 1, 1
   0, 1, 1, 1, 1
   0, 1, 1, 1, 1, 1
   0, 1, 1, 1, 1, 1, 1
   0, 1, 1, 1, 1, 1, 1, 1
   0, 1, 1, 1, 1, 1, 1, 1, 1
   ... (End)
		

Crossrefs

Programs

  • PARI
    A000108(n) = binomial(2*n, n)/(n+1);
    A032357(n) = sum(k=0, n, (-1)^(n-k)*A000108(k));
    T(n, k) = if ((k==0), (-1)^n, if ((n<0) || (k<0), 0, if (k==1, A032357(n-1), if (n > k-1, T(n, k-1) - T(n-1, k-2), 0))));
    for(n=0, 10, for (k=0, n, print1(T(n, k), ", ")); print); \\ Petros Hadjicostas, Aug 08 2020

Formula

T(n,0) = (-1)^n and T(n,n) = 1.
Sum_{0 <= k <= n} T(n,k) = A032357(n).
From Petros Hadjicostas, Aug 08 2020: (Start)
T(n,k) = T(n,k-1) - T(n-1,k-2) for 2 <= k <= n with initial conditions T(n,0) = (-1)^n (n >= 0) and T(n,1) = A032357(n-1) (n >= 1).
T(n,2) = A033297(n).
T(n,n-1) = n - 2 for n >= 1.
|T(n,k)| = |A096470(n,n-k)| for 0 <= k <= n.
Bivariate o.g.f.: 1/((1 + x)*(1 - x*y*c(x))), where c(x) is the o.g.f. of A000108.
Bivariate o.g.f.: (1 - y + x*y*c(x))/((1 + x)*(1 - y + x*y^2)).
Bivariate o.g.f. of |T(n,k)|: (o.g.f. of T(n,k)) + 2*x/(1 - x^2). (End)

A096470 Triangle T(n,k), read by rows, formed by setting all entries in the zeroth column and in the main diagonal ((n,n) entries) to 1 and defining the rest of the entries by the recursion T(n,k) = T(n-1,k) - T(n,k-1).

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, -1, 2, 1, 1, -2, 4, -3, 1, 1, -3, 7, -10, 11, 1, 1, -4, 11, -21, 32, -31, 1, 1, -5, 16, -37, 69, -100, 101, 1, 1, -6, 22, -59, 128, -228, 329, -328, 1, 1, -7, 29, -88, 216, -444, 773, -1101, 1102, 1, 1, -8, 37, -125, 341, -785, 1558, -2659, 3761, -3760, 1, 1, -9, 46, -171, 512, -1297, 2855, -5514, 9275, -13035, 13036, 1
Offset: 0

Views

Author

Gerald McGarvey, Aug 12 2004

Keywords

Comments

If A(x,y) is the bivariate o.g.f. of a triangular array T(n,k) and B(x,y) is the bivariate o.g.f. of its mirror image T(n,n-k), then B(x,y) = A(x*y, y^(-1)) and A(x,y) = B(x*y, y^(-1)). - Petros Hadjicostas, Aug 08 2020

Examples

			From _Petros Hadjicostas_, Aug 08 2020: (Start)
Triangle T(n,k) (with rows n >= 0 and columns k = 0..n) begins:
  1;
  1,  1;
  1,  0,  1;
  1, -1,  2,   1;
  1, -2,  4,  -3,   1;
  1, -3,  7, -10,  11,    1;
  1, -4, 11, -21,  32,  -31,   1;
  1, -5, 16, -37,  69, -100, 101,    1;
  1, -6, 22, -59, 128, -228, 329, -328, 1;
  ... (End)
		

Crossrefs

Programs

  • PARI
    T(n, k) = if ((k==0) || (n==k), 1, if ((n<0) || (k<0), 0, if (n>k, T(n-1, k) - T(n, k-1), 0)));
    for(n=0, 10, for (k=0, n, print1(T(n, k), ", ")); print); \\ Petros Hadjicostas, Aug 08 2020

Formula

T(n,k) = T(n-1,k) - T(n,k-1) for 1 <= k <= n-1 with T(n,0) = 1 = T(n,n) for n >= 0.
The 2nd column is T(n,2) = A000124(n-2) for n >= 2 (Hogben's central polygonal numbers).
The "first subdiagonal" (unsigned) is |T(n,n-1)| = A032357(n-1) for n >= 1 (Convolution of Catalan numbers and powers of -1).
The "2nd subdiagonal" (unsigned) is |T(n,n-2)| = A033297(n) = Sum_{i=0..n-2} (-1)^i*C(n-1-i) for n >= 2, where C(n) are the Catalan numbers (A000108).
From Petros Hadjicostas, Aug 08 2020: (Start)
|T(n,k)| = |A168377(n,n-k)| for 0 <= k <= n.
Bivariate o.g.f.: (1 + y + x*y*c(-x*y))/((1 - x*y)*(1 - x + y)), where c(x) = 2/(1 + sqrt(1 - 4*x)) = o.g.f. of A000108.
Bivariate o.g.f. of |T(n,k)|: (1 - y - x*y*c(x*y))/((1 + x*y)*(1 - x - y)) + 2*x*y/(1 - x^2*y^2).
Bivariate o.g.f. of mirror image T(n,n-k): (1 + y + x*y*c(-x))/((1 - x)*(1 + y - x*y^2)).
Bivariate o.g.f. of |T(n,n-k)|: (1 - y + x*y*c(x))/((1 + x)*(1 - y + x*y^2)) + 2*x/(1 - x^2). (End)

Extensions

Offset changed to 0 by Petros Hadjicostas, Aug 08 2020

A143949 Triangle read by rows: T(n,k) is the number of n-Dyck paths containing k odd-length descents to ground level (0<=k<=n).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 3, 0, 1, 4, 4, 5, 0, 1, 10, 17, 7, 7, 0, 1, 32, 46, 34, 10, 9, 0, 1, 100, 155, 94, 55, 13, 11, 0, 1, 329, 502, 335, 154, 80, 16, 13, 0, 1, 1101, 1701, 1110, 580, 226, 109, 19, 15, 0, 1, 3761, 5820, 3865, 1960, 898, 310, 142, 22, 17, 0, 1, 13035, 20251
Offset: 0

Views

Author

Emeric Deutsch, Oct 05 2008

Keywords

Comments

Row sums are the Catalan numbers (A000108).
T(0,n)=A033297(n).
Sum(k*T(n,k),k=0..n)=A000957(n+2) (the Fine numbers).
The case of even-length descents to ground level is considered in A111301.

Examples

			T(4,2) = 5 because we have U(D)U(D)UUDD, U(D)UUDDU(D), U(D)UUU(DDD), UUDDU(D)U(D) and UUU(DDD)U(D) (the odd-length descents to ground level are shown between parentheses).
Triangle starts:
1;
0,1;
1,0,1;
1,3,0,1;
4,4,5,0,1;
10,17,7,7,0,1;
		

Crossrefs

Programs

  • Maple
    C:=((1-sqrt(1-4*z))*1/2)/z: G:=1/(1-z*(t+z*C)/(1-z^2*C^2)): Gser:=simplify(series(G,z=0,14)): for n from 0 to 11 do P[n]:=sort(expand(coeff(Gser,z,n))) end do: for n from 0 to 11 do seq(coeff(P[n],t,j),j=0..n) end do; # yields sequence in triangular form

Formula

G.f.: G(s,z) = 1/[1-z(t+zC)/(1-z^2*C^2)], where C = [1-sqrt(1-4z)]/(2z) is the Catalan function.
The trivariate g.f. H(t,s,z), where t (s) marks odd-length (even-length) descents to ground level and z marks semilength, is H=1/[1-z(t+szC)/(1-z^2*C^2)], where C=[1-sqrt(1-4z)]/(2z) is the Catalan function.

A237596 Convolution triangle of A000958(n+1).

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 8, 7, 3, 1, 24, 22, 12, 4, 1, 75, 73, 43, 18, 5, 1, 243, 246, 156, 72, 25, 6, 1, 808, 844, 564, 283, 110, 33, 7, 1, 2742, 2936, 2046, 1092, 465, 158, 42, 8, 1, 9458, 10334, 7449, 4178, 1906, 714, 217, 52, 9, 1, 33062, 36736, 27231, 15904, 7670, 3096, 1043, 288, 63, 10, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 09 2014

Keywords

Comments

Riordan array (f(x)/x, f(x)) where f(x) is the g.f. of A000958.
Reversal of A236918.
Row sums are A109262(n+1).
Diagonal sums are A033297(n+2).

Examples

			Triangle begins:
    1;
    1,   1;
    3,   2,   1;
    8,   7,   3,   1;
   24,  22,  12,   4,   1;
   75,  73,  43,  18,   5,  1;
  243, 246, 156,  72,  25,  6, 1;
  808, 844, 564, 283, 110, 33, 7, 1;
  ...
		

Crossrefs

Columns give A000958, A114495.
Cf. A033297 (diagonal sums), A109262 (row sums), A236918 (row reversal).

Programs

  • Maple
    # Uses function PMatrix from A357368. Adds column 1,0,0,0,... to the left.
    PMatrix(10, n -> A000958(n)); # Peter Luschny, Oct 19 2022
  • Mathematica
    P[n_, x_]:= P[n, x]= If[n==0, 1, Sum[(j/(2*n-j))*Binomial[2*n-j, n-j]*Fibonacci[j, x], {j,0,n}]];
    T[n_, k_] := Coefficient[P[n+1, x], x, k];
    Table[T[n, k], {n,0,13}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 14 2022 *)
  • SageMath
    def f(n,x): return sum( binomial(n-j-1, j)*x^(n-2*j-1) for j in (0..(n-1)//2) )
    def p(n,x):
        if (n==0): return 1
        else: return sum( (j/(2*n-j))*binomial(2*n-j, n-j)*f(j, x) for j in (0..n) )
    def A237596(n,k): return ( p(n+1,x) ).series(x, n+1).list()[k]
    flatten([[A237596(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jun 14 2022

Formula

G.f. for the column k-1: ((1-sqrt(1-4*x))^k/(1+sqrt(1-4*x) + 2*x)^k)/x.
Sum_{k=0..n} T(n,k) = A109262(n+1).
From G. C. Greubel, Jun 14 2022: (Start)
T(n, k) = coefficient of [x^k]( p(n+1, x) ), where p(n, x) = Sum_{j=0..n} (j/(2*n-j))*binomial(2*n-j, n-j)*Fibonacci(j, x) with p(0, x) = 1 and Fibonacci(n, x) are the Fibonacci polynomials.
T(n, k) = A236918(n, n-k). (End)

A278072 Riordan array(1/(1+x), (1-sqrt(1-4*x))/(2*x)).

Original entry on oeis.org

1, -1, 1, 1, 1, 1, -1, 4, 3, 1, 1, 10, 11, 5, 1, -1, 32, 37, 22, 7, 1, 1, 100, 128, 88, 37, 9, 1, -1, 329, 444, 341, 171, 56, 11, 1, 1, 1101, 1558, 1297, 739, 294, 79, 13, 1, -1, 3761, 5514, 4891, 3069, 1406, 465, 106, 15, 1, 1, 13035, 19680, 18365, 12435, 6346, 2442, 692, 137, 17, 1
Offset: 0

Views

Author

Peter Luschny, Nov 22 2016

Keywords

Examples

			[   1]
[  -1,   1]
[   1,   1,   1]
[  -1,   4,   3,   1]
[   1,  10,  11,   5,   1]
[  -1,  32,  37,  22,   7,  1]
[   1, 100, 128,  88,  37,  9,  1]
[  -1, 329, 444, 341, 171, 56, 11, 1]
		

Crossrefs

Programs

  • Mathematica
    (* The function RiordanArray is defined in A256893. *)
    RiordanArray[1/(1+#)&, (1-Sqrt[1-4#])/(2#)&, 11] // Flatten (* Jean-François Alcover, Jul 16 2019 *)
  • Sage
    # uses[riordan_array from A256893]
    riordan_array(1/(1+x), (1-sqrt(1-4*x))/(2*x), 8)
Showing 1-7 of 7 results.