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.

Previous Showing 11-20 of 29 results. Next

A037955 a(n) = binomial(n, floor(n/2)-1).

Original entry on oeis.org

0, 0, 1, 1, 4, 5, 15, 21, 56, 84, 210, 330, 792, 1287, 3003, 5005, 11440, 19448, 43758, 75582, 167960, 293930, 646646, 1144066, 2496144, 4457400, 9657700, 17383860, 37442160, 67863915, 145422675, 265182525, 565722720, 1037158320, 2203961430, 4059928950, 8597496600, 15905368710, 33578000610, 62359143990
Offset: 0

Views

Author

Keywords

Comments

Number of returns to the axis in all left factors of Dyck paths of length n. Example: a(4)=4 because in U(D)U(D), U(D)UU, UUD(D), UUDU, UUUD, and UUUU we have a total of 2+1+1+0+0+0=4 returns to the axis (shown between parentheses); here U=(1,1) and D=(1,-1). - Emeric Deutsch, Jun 06 2011
a(n) is the number of subsets of {1,2,...,n} that contain exactly 1 more even than odd elements. For example, a(6) = 15 and the 15 sets are {2}, {4}, {6}, {1,2,4}, {1,2,6}, {1,4,6}, {2,3,4}, {2,3,6}, {2,4,5}, {2,5,6}, {3,4,6}, {4,5,6}, {1,2,3,4,6}, {1,2,4,5,6}, {2,3,4,5,6}. - Enrique Navarrete, Dec 20 2019

Crossrefs

Programs

  • Magma
    [Binomial(n, Floor((n-2)/2)): n in [0..40]]; // G. C. Greubel, Dec 31 2019
    
  • Maple
    seq(binomial(n, floor((n-2)/2)), n = 0..40);
  • Mathematica
    Table[Binomial[n,Floor[n/2-1]], {n,0,40}] (* Wesley Ivan Hurt, Oct 16 2013 *)
  • PARI
    vector(41, n, binomial(n-1, (n-3)\2) ) \\ G. C. Greubel, Dec 31 2019
    
  • Sage
    [binomial(n, floor(n/2)-1) for n in (0..40)] # G. C. Greubel, Dec 31 2019

Formula

E.g.f.: Bessel_I(2,2*x) + Bessel_I(3,2*x). - Paul Barry, Feb 28 2006
G.f.: g(z) = z^2*c^3/(1-z*c), where c = (1-sqrt(1-4*z^2))/(2*z^2) is the Catalan function with argument z^2. - Emeric Deutsch, Jun 06 2011
(n+3)*(n-2)*a(n) +2*n*a(n-1) +4*n*(n-1)*a(n-2) = 0. - R. J. Mathar, Nov 30 2012
a(n) = binomial(n, (n-2)/2), n even; a(n) = binomial(n, (n-3)/2), n odd. - Enrique Navarrete, Dec 20 2019

A005774 Number of directed animals of size n (k=1 column of A038622); number of (s(0), s(1), ..., s(n)) such that s(i) is a nonnegative integer and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n, where s(0) = 2; also sum of row n+1 of array T in A026323.

Original entry on oeis.org

0, 1, 3, 9, 26, 75, 216, 623, 1800, 5211, 15115, 43923, 127854, 372749, 1088283, 3181545, 9312312, 27287091, 80038449, 234988827, 690513030, 2030695569, 5976418602, 17601021837, 51869858544, 152951628725, 451271872701, 1332147482253
Offset: 0

Views

Author

Keywords

Comments

Number of ordered trees with n+1 edges, having root degree at least 2 and nonroot outdegrees at most 2. - Emeric Deutsch, Aug 02 2002
From Petkovsek's algorithm, this recurrence does not have any closed form solutions. So there is no hypergeometric closed form for a(n). - Herbert S. Wilf
Sum of two consecutive trinomial coefficients starting two positions before central one. Example: a(4) = 10+16 and (1 + x + x^2)^4 = ... + 10*x^2 + 16*x^3 + 19*x^4 + ... - David Callan, Feb 07 2004
Image of n (A001477) under the Motzkin related matrix A107131. Binomial transform of A037952. - Paul Barry, May 12 2005
a(n) = total number of ascents (maximal runs of consecutive upsteps) in all Motzkin (n+1)-paths. For example, the 9 Motzkin 4-paths are FFFF, FFUD, FUDF, FUFD, UDFF, UDUD, UFDF, UFFD, UUDD and they contain a total of 9 ascents and so a(3)=9 (U=upstep, D=downstep, F=flatstep). - David Callan, Aug 16 2006
Image of the sequence (0,1,2,3,3,3,...) under the array A122896. - Paul Barry, Sep 18 2006
This is some kind of Motzkin transform of A079978 because the substitution x-> x*A001006(x) in the independent variable of the g.f. A079978(x) yields 1,0 followed by this sequence here. - R. J. Mathar, Nov 08 2008

Examples

			G.f.: x + 3*x^2 + 9*x^3 + 26*x^4 + 75*x^5 + 216*x^6 + 623*x^7 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a005774 0 = 0
    a005774 n = a038622 n 1 -- Reinhard Zumkeller, Feb 26 2013
  • Maple
    seq( add(binomial(i,k+1)*binomial(i-k,k), k=0..floor(i/2)), i=0..30 ); # Detlef Pauly (dettodet(AT)yahoo.de), Nov 09 2001
    seq(simplify(GegenbauerC(n-2,-n,-1/2) + GegenbauerC(n-1,-n,-1/2)), n=0..27); # Peter Luschny, May 12 2016
  • Mathematica
    CoefficientList[Series[(1-x-Sqrt[1-2x-3x^2])/(x(1-3x+Sqrt[1-2x-3x^2])),{x,0,30}],x] (* Harvey P. Dale, Sep 20 2011 *)
    RecurrenceTable[{a[0]==0, a[1]==1,a[n]==(2n(n+1)a[n-1]+3n(n-1)a[n-2])/ ((n+2)(n-1))},a,{n,30}] (* Harvey P. Dale, Nov 09 2012 *)
  • PARI
    s=[0,1]; {A005774(n)=k=(2*(n+2)*(n+1)*s[2]+3*(n+1)*n*s[1])/((n+3)*n); s[1]=s[2]; s[2]=k; k}
    
  • PARI
    {a(n) = if( n<2, n>0, (2 * (n+1) * n *a(n-1) + 3 * (n-1) * n * a(n-2)) / (n+2) / (n-1))}; /* Michael Somos, May 01 2003 */
    

Formula

Inverse binomial transform of [ 0, 1, 5, 21, 84, ... ] (A002054). - John W. Layman
D-finite with recurrence (n+2)*(n-1)*a(n) = 2*n*(n+1)*a(n-1) + 3*n*(n-1)*a(n-2) for all n in Z. - Michael Somos, May 01 2003
E.g.f.: exp(x)*(BesselI(1, 2*x)+BesselI(2, 2*x)). - Vladeta Jovovic, Jan 01 2004
G.f.: (1-x-sqrt(1-2x-3x^2))/(x(1-3x+sqrt(1-2x-3x^2))); a(n)= Sum_{k=0..n} C(k+1, n-k+1)*C(n, k)*k/(k+1); a(n) = Sum_{k=0..n} C(n, k)*C(k, floor((k-1)/2)). - Paul Barry, May 12 2005
Starting (1, 3, 9, 26, ...) = binomial transform of A026010: (1, 2, 4, 7, 14, 25, 50, 91, ...). - Gary W. Adamson, Oct 22 2007
a(n)*(2+n) = (4+4*n)*a(n-1) - n*a(n-2) + (12-6*n)*a(n-3). - Simon Plouffe, Feb 09 2012
a(n) ~ 3^(n+1/2) / sqrt(Pi*n). - Vaclav Kotesovec, Mar 10 2014
0 = a(n)*(+36*a(n+1) + 18*a(n+2) - 96*a(n+3) + 30*a(n+4)) + a(n+1)*(-6*a(n+1) + 49*a(n+2) - 26*a(n+3) + 3*a(n+4)) + a(n+2)*(+15*a(n+3) - 8*a(n+4)) + a(n+3)*(a(n+4)) if n >= 0. - Michael Somos, Aug 06 2014
a(n) = GegenbauerC(n-2,-n,-1/2) + GegenbauerC(n-1,-n,-1/2). - Peter Luschny, May 12 2016

Extensions

Further descriptions from Clark Kimberling

A219311 Number T(n,k) of standard Young tableaux for partitions of n into exactly k distinct parts; triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 3, 0, 1, 9, 0, 1, 14, 16, 0, 1, 34, 35, 0, 1, 55, 134, 0, 1, 125, 435, 0, 1, 209, 1213, 768, 0, 1, 461, 3454, 2310, 0, 1, 791, 10484, 11407, 0, 1, 1715, 28249, 44187, 0, 1, 3002, 80302, 200044, 0, 1, 6434, 231895, 680160, 292864
Offset: 0

Views

Author

Alois P. Heinz, Nov 17 2012

Keywords

Comments

T(n,k) is defined for n,k >= 0. The triangle contains only the terms with k<=A003056(n). T(n,k) = 0 for k>A003056(n).

Examples

			A(4,2) = 3:
  +---------+  +---------+  +---------+
  | 1  2  3 |  | 1  2  4 |  | 1  3  4 |
  | 4 .-----+  | 3 .-----+  | 2 .-----+
  +---+        +---+        +---+
Triangle T(n,k) begins:
  1;
  0,  1;
  0,  1;
  0,  1,    2;
  0,  1,    3;
  0,  1,    9;
  0,  1,   14,    16;
  0,  1,   34,    35;
  0,  1,   55,   134;
  0,  1,  125,   435;
  0,  1,  209,  1213,   768;
  0,  1,  461,  3454,  2310;
  0,  1,  791, 10484, 11407;
  ...
		

Crossrefs

Columns k=0-10 give: A000007, A000012 (for n>0), A047171(n) = A037952(n)-1, A219316, A219317, A219318, A219319, A219320, A219321, A219322, A219323.
Row sums give: A218293.
Row lengths are 1 + A003056(n).
T(A000217(k),k) = A005118(k+1).

Programs

  • Maple
    h:= proc(l) local n; n:=nops(l); add(i, i=l)!/mul(mul(1+l[i]-j+
          add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n)
        end:
    g:= proc(n, i, k, l) `if`(n=0, h(l), `if`(n>k*(i-(k-1)/2), 0,
          g(n, i-1, min(k, i-1), l)+`if`(i>n, 0, g(n-i, i-1, k-1, [l[], i]))))
        end:
    A:= proc(n, k) option remember; `if`(k<0, 0, g(n, n, k, [])) end:
    T:= (n, k)-> A(n, k) -A(n, k-1):
    seq(seq(T(n, k), k=0..floor((sqrt(1+8*n)-1)/2)), n=0..20);
  • Mathematica
    h[l_] := With[{n = Length[l]}, Sum[i, {i, l}]!/Product[Product[1+l[[i]] - j + Sum[If[l[[k]] >= j, 1, 0], {k, i+1, n}], {j, 1, l[[i]]}], {i, 1, n}] ];
    g[n_, i_, k_, l_] := If[n == 0, h[l], If[n > k*(i-(k-1)/2), 0, g[n, i-1, Min[k, i-1], l] + If[i > n, 0, g[n-i, i-1, k-1, Append[l, i]]]]];
    a[n_, k_] := a[n, k] = If[k < 0, 0, g[n, n, k, {}]];
    t[n_, k_] := a[n, k] - a[n, k-1];
    Table[Table[t[n, k], {k, 0, Floor[(Sqrt[1+8*n]-1)/2]}], {n, 0, 20}] // Flatten (* Jean-François Alcover, Dec 17 2013, translated from Maple *)

A101491 Triangle T(n,k), read by rows: number of Knödel walks starting at 0, ending at k, with n steps.

Original entry on oeis.org

1, 0, 1, 2, 1, 1, 1, 3, 1, 1, 5, 4, 4, 1, 1, 5, 10, 5, 5, 1, 1, 15, 15, 15, 6, 6, 1, 1, 20, 35, 21, 21, 7, 7, 1, 1, 50, 56, 56, 28, 28, 8, 8, 1, 1, 76, 126, 84, 84, 36, 36, 9, 9, 1, 1, 176, 210, 210, 120, 120, 45, 45, 10, 10, 1, 1, 286, 462, 330, 330, 165, 165, 55, 55, 11, 11, 1, 1
Offset: 0

Views

Author

Ralf Stephan, Jan 21 2005

Keywords

Examples

			Triangle begins:
  1,
  0,1,
  2,1,1,
  1,3,1,1,
  5,4,4,1,1,
  5,10,5,5,1,1,
  15,15,15,6,6,1,1,
  20,35,21,21,7,7,1,1,
  50,56,56,28,28,8,8,1,1,
  76,126,84,84,36,36,9,9,1,1,
  ...
		

Crossrefs

Left-hand columns include A086905, A037952, A037955, A037951, A037956, A037953, A037957, A037954, A037958.

Programs

  • Mathematica
    A101491[n_, k_] := If[k == 0, Sum[(-1)^(n - i)*Binomial[i, BitShiftRight[i]], {i, 0, n}], Binomial[n, BitShiftRight[n - k]]];
    Table[A101491[n, k], {n, 0, 15}, {k, 0, n}] (* Paolo Xausa, Jan 17 2025 *)
  • PARI
    T(n, k) = if (k==0, sum(i=0, n, (-1)^(n-i)*binomial(i, i\2)), binomial(n, (n-k)\2));
    tabl(nn) = for (n=0, nn, for (k=0, n, print1(T(n, k), ", ")); print();); \\ Michel Marcus, Dec 04 2016

Formula

G.f.: r(z)/(z*(1+z)*(1-r(z)))*(1+x*z*r(z))/(1-x*r(z)), with r(z) = (1-sqrt(1-4*z^2))/(2*z). Then the g.f. of the k-th column is r(z)^(k+1)/(z*(1-r(z))).
T(n, k) = Sum_{i=0..n} (-1)^(n-i)*C(i, floor(i/2)) for k=0, otherwise T(n, k) = C(n, floor((n-k)/2)).

A112554 Riordan array (c(x^2)^2, x*c(x^2)), c(x) the g.f. of A000108.

Original entry on oeis.org

1, 0, 1, 2, 0, 1, 0, 3, 0, 1, 5, 0, 4, 0, 1, 0, 9, 0, 5, 0, 1, 14, 0, 14, 0, 6, 0, 1, 0, 28, 0, 20, 0, 7, 0, 1, 42, 0, 48, 0, 27, 0, 8, 0, 1, 0, 90, 0, 75, 0, 35, 0, 9, 0, 1, 132, 0, 165, 0, 110, 0, 44, 0, 10, 0, 1, 0, 297, 0, 275, 0, 154, 0, 54, 0, 11, 0, 1, 429, 0, 572, 0, 429, 0, 208, 0, 65, 0, 12, 0, 1
Offset: 0

Views

Author

Paul Barry, Sep 13 2005

Keywords

Comments

Inverse of A112552.
The n-th row polynomial (in descending powers of x) is equal to the n-th degree Taylor polynomial of the polynomial function (1 - x^4)*(1 + x^2)^n about 0. For example, when n = 6, (1 - x^4)*(1 + x^2)^6 = 1 + 6*x^2 + 14*x^4 + 14*x^6 + O(x^8). - Peter Bala, Feb 19 2018

Examples

			Triangle begins
   1;
   0, 1;
   2, 0,  1;
   0, 3,  0, 1;
   5, 0,  4, 0, 1;
   0, 9,  0, 5, 0, 1;
  14, 0, 14, 0, 6, 0, 1;
		

Crossrefs

Row sums A037952, matrix inverse A112552.
Cf. A000108, A037952 (row sums), A112552, A112553.

Programs

  • Magma
    A112554:= func< n,k | ((1+(-1)^(n-k))/2)*(Binomial(n, Floor((n-k)/2)) - Binomial(n, Floor((n-k-4)/2))) >;
    [A112554(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Jan 13 2022
  • Maple
    seq(seq((1 + (-1)^(n-k))/2*( binomial(n, floor((n - k)/2)) - binomial(n, floor((n - k - 4)/2 )) ), k = 0..n), n = 0..10); # Peter Bala, Feb 19 2018
  • Mathematica
    T[n_, k_] := (1 + (-1)^(n-k))/2 (Binomial[n, Floor[(n-k)/2]] - Binomial[n, Floor[(n-k-4)/2]]);
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] (* Jean-François Alcover, Jun 13 2019 *)
  • Sage
    # Algorithm of L. Seidel (1877)
    # Prints the first n rows of a signed version of the triangle.
    def Signed_A112554_triangle(n) :
        D = [0]*(n+4); D[1] = 1
        b = False; h = 2
        for i in range(2*n+2) :
            if b :
                for k in range(h,0,-1) : D[k] += D[k-1]
                h += 1
            else :
                for k in range(1,h, 1) : D[k] -= D[k+1]
            b = not b
            if b and i > 0 : print([D[z] for z in (2..h-1)])
    Signed_A112554_triangle(13) # Peter Luschny, May 01 2012
    

Formula

Sum_{k=0..n} T(n, k) = binomial(n+1, floor(n/2)) = A037952(n+1).
T(n, k) = ((1 + (-1)^(n-k))/2)*binomial(n, floor((n-k)/2)) - binomial(n, floor((n-k-4)/2 )). - Peter Bala, Feb 19 2018

A191389 Number of valleys at level 0 in all dispersed Dyck paths of length n (i.e., in all Motzkin paths of length n with no (1,0) steps at positive heights).

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 7, 14, 37, 74, 176, 352, 794, 1588, 3473, 6946, 14893, 29786, 63004, 126008, 263950, 527900, 1097790, 2195580, 4540386, 9080772, 18696432, 37392864, 76717268, 153434536, 313889477, 627778954, 1281220733, 2562441466, 5219170052, 10438340104
Offset: 0

Views

Author

Emeric Deutsch, Jun 02 2011

Keywords

Examples

			a(5)=2 because in HHHHH, HHHUD, HHUDH, HUDHH, HUUDD, UDHHH, UDHUD, UUDDH, HUDUD, and UDUDH only the last 2 paths have 1 valley at level 0; here U=(1,1), D=(1,-1), H=(1,0).
		

Crossrefs

Cf. A191387. Convolution square of A037952 (shifted 2 places right).

Programs

  • Maple
    g := (2*(1-2*z^2-sqrt(1-4*z^2)))/(1-2*z+sqrt(1-4*z^2))^2: gser := series(g, z = 0, 40): seq(coeff(gser, z, n), n = 0 .. 35);
  • Mathematica
    CoefficientList[Series[(2*(1-2*x^2-Sqrt[1-4*x^2]))/(1-2*x+Sqrt[1-4*x^2])^2, {x, 0, 20}], x] (* Vaclav Kotesovec, Mar 20 2014 *)
  • PARI
    z='z+O('z^50); concat([0,0,0,0], Vec(2*(1-2*z^2 -sqrt(1-4*z^2)) /(1 - 2*z + sqrt(1-4*z^2))^2)) \\ G. C. Greubel, Feb 12 2017

Formula

a(n) = Sum_{k=0..n} k*A191387(n,k).
G.f.: 2*(1-2*z^2-sqrt(1-4*z^2))/(1-2*z+sqrt(1-4*z^2))^2.
a(n) ~ 2^(n-1) * (1-3*sqrt(2)/sqrt(Pi*n)). - Vaclav Kotesovec, Mar 20 2014
D-finite with recurrence -(n+2)*(n-4)*a(n) +2*(n+2)*(n-4)*a(n-1) +4*(n-2)*(n-3)*a(n-2) -8*(n-2)*(n-3)*a(n-3)=0. - R. J. Mathar, Sep 24 2021

A265848 Pascal's triangle, right and left halves interchanged.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 1, 1, 3, 4, 1, 1, 4, 6, 10, 5, 1, 1, 5, 10, 15, 6, 1, 1, 6, 15, 20, 35, 21, 7, 1, 1, 7, 21, 35, 56, 28, 8, 1, 1, 8, 28, 56, 70, 126, 84, 36, 9, 1, 1, 9, 36, 84, 126, 210, 120, 45, 10, 1, 1, 10, 45, 120, 210, 252, 462, 330, 165, 55, 11, 1, 1, 11, 55, 165, 330, 462
Offset: 0

Views

Author

Reinhard Zumkeller, Dec 24 2015

Keywords

Comments

Concatenations of rows of A014413 and A034868.
Alternative mirrored variant: concatenation of A034869 and A014462.

Examples

			.   0:                                1
.   1:                              1   1
.   2:                            1   1   2
.   3:                          3   1   1   3
.   4:                        4   1   1   4   6
.   5:                     10   5   1   1   5   10
.   6:                   15   6   1   1   6   15  20
.   7:                 35   21  7   1   1   7   21   35
.   8:              56   28   8   1   1   8   28  56   70
.   9:           126   84   36  9   1   1   9   36   84   126
.  10:        210   120  45  10   1   1   10  45  120  210  252
.  11:     462   330  165   55  11  1   1   11  55  165   330  462
.  12:  792   495  220   66  12   1   1   12  66  220  495  792   924  .
		

Crossrefs

Cf. A014413, A014462, A034868, A034869, A007318, A001405, A037952, A000079 (row sums), A001142 (row products).

Programs

  • Haskell
    a265848 n k = a265848_tabl !! n !! k
    a265848_row n = a265848_tabl !! n
    a265848_tabl = zipWith (++) ([] : a014413_tabf) a034868_tabf
  • Mathematica
    row[n_] := Binomial[n, Join[Range[Floor[n/2] + 1, n], Range[0, Floor[n/2]]]]; Array[row, 12, 0] // Flatten (* Amiram Eldar, May 13 2025 *)

Formula

T(n,k) = A007318(n, (k + floor((n+2)/2)) mod (n+1)).
T(n,k) = if k <= [(n+1)/2] then A014413(n,k+1) else A034868(n,k-[(n+1)/2]).
T(n,0) = A037952(n) for n > 0.
T(n,n) = A001405(n).

A007007 Valence of graph of maximal intersecting families of sets.

Original entry on oeis.org

0, 1, 3, 4, 10, 15, 35, 56, 126, 210, 462, 792, 1716, 3003, 6435, 11440, 24310, 43758, 92378, 167960, 352716, 646646, 1352078, 2496144, 5200300, 9657700, 20058300, 37442160, 77558760, 145422675, 300540195, 565722720, 1166803110, 2203961430
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Formula

Equals A037952 except for n=1 [Loeb & Meyerowitz, theorem 16]. - Andrey Zabolotskiy, Sep 19 2017

Extensions

More terms from Andrey Zabolotskiy, Sep 19 2017

A047171 Number of nonempty subsets of {1,2,...,n} in which exactly 1/2 of the elements are <= (n-1)/2.

Original entry on oeis.org

0, 0, 0, 2, 3, 9, 14, 34, 55, 125, 209, 461, 791, 1715, 3002, 6434, 11439, 24309, 43757, 92377, 167959, 352715, 646645, 1352077, 2496143, 5200299, 9657699, 20058299, 37442159, 77558759, 145422674, 300540194, 565722719, 1166803109, 2203961429, 4537567649
Offset: 0

Views

Author

Keywords

Comments

For n>=1 the number of standard Young tableaux with shapes corresponding to partitions into two distinct parts. - Joerg Arndt, Oct 25 2012

Crossrefs

Column k=2 of A219311. - Alois P. Heinz, Nov 17 2012

Programs

  • Magma
    [0] cat [Binomial(n, Floor((n-1)/2))-1: n in [1..40]]; // Vincenzo Librandi, Jul 03 2015
  • Maple
    a:= n-> binomial(n, iquo(n-1,2))-1:
    seq(a(n), n=0..40);  # Alois P. Heinz, Nov 17 2012
  • Mathematica
    a[n_] := Binomial[n, Floor[(n-1)/2]]-1; a[0] = 0; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jul 03 2015 *)

Formula

a(n) = A037952(n) - 1. Proof by Ira Gessel: Write down the number of such subsets with k elements <= (n-1)/2 as a product of two binomial coefficients, then evaluate the sum using Vandermonde's theorem.

A289871 Irregular triangle read by rows T(n, k) is the number of admissible pinnacle sets with maximum element n and cardinality k.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 1, 0, 1, 2, 0, 1, 3, 0, 1, 4, 5, 0, 1, 5, 9, 0, 1, 6, 14, 14, 0, 1, 7, 20, 28, 0, 1, 8, 27, 48, 42, 0, 1, 9, 35, 75, 90, 0, 1, 10, 44, 110, 165, 132, 0, 1, 11, 54, 154, 275, 297, 0, 1, 12, 65, 208, 429, 572, 429, 0, 1, 13, 77, 273, 637, 1001, 1001
Offset: 0

Views

Author

Michel Marcus, Jul 14 2017

Keywords

Comments

See David et al. link for definitions.

Examples

			Triangle begins:
1;
0;
0;
0, 1;
0, 1;
0, 1, 2;
0, 1, 3;
0, 1, 4, 5;
0, 1, 5, 9;
...
		

Crossrefs

Cf. A008315, A037952 (row sums).

Programs

  • Mathematica
    T[0, 0] = 1; T[, 0] = 0; T[n, k_] /; n <= 2k = 0; T[n_, k_] := T[n, k] = Sum[T[j, k-1], {j, 0, n-1}];
    Table[T[n, k], {n, 0, 16}, {k, 0, Max[0, (n-1)/2]}] // Flatten (* Jean-François Alcover, Feb 02 2019 *)
  • PARI
    T(n, k) = {if ((n==0) && (k==0), return (1)); if (n <= 2*k, return(0)); sum(kk=0, n-1, T(kk, k-1));}
    tabf(nn) = {print(T(0, 0), ", "); for (n=1, nn, for (k=0, round(n-1)\2, print1(T(n, k), ", ");); print(););}

Formula

T(n,k) = Sum_{n>2k} T(n,k-1) if n>2*k; T(n,k) = 0 if n<=2*k; T(0,0) = 1.
Previous Showing 11-20 of 29 results. Next