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 21-30 of 34 results. Next

A106268 Number triangle T(n,k) = (-1)^(n-k)*binomial(k-n, n-k) = (0^(n-k) + binomial(2*(n-k), n-k))/2 if k <= n, 0 otherwise; Riordan array (1/(2-C(x)), x) where C(x) is g.f. for Catalan numbers A000108.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 10, 3, 1, 1, 35, 10, 3, 1, 1, 126, 35, 10, 3, 1, 1, 462, 126, 35, 10, 3, 1, 1, 1716, 462, 126, 35, 10, 3, 1, 1, 6435, 1716, 462, 126, 35, 10, 3, 1, 1, 24310, 6435, 1716, 462, 126, 35, 10, 3, 1, 1, 92378, 24310, 6435, 1716, 462, 126, 35, 10, 3, 1, 1
Offset: 0

Views

Author

Paul Barry, Apr 28 2005

Keywords

Comments

Triangle includes A088218.
Inverse is A106270.

Examples

			Triangle (with rows n >= 0 and columns k >= 0) begins as follows:
    1;
    1,  1;
    3,  1,  1;
   10,  3,  1, 1;
   35, 10,  3, 1, 1;
  126, 35, 10, 3, 1, 1;
  ...
Production matrix begins:
    1, 1;
    2, 0, 1;
    5, 0, 0, 1;
   14, 0, 0, 0, 1;
   42, 0, 0, 0, 0, 1;
  132, 0, 0, 0, 0, 0, 1;
  429, 0, 0, 0, 0, 0, 0, 1;
  ... - _Philippe Deléham_, Oct 02 2014
		

Crossrefs

Cf. A000108, A024718 (row sums), A088218, A106269 (diagonal sums), A106270.

Programs

  • Magma
    A106268:= func< n,k | k eq n select 1 else (n-k+1)*Catalan(n-k)/2 >;
    [A106268(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 10 2023
    
  • Mathematica
    T[n_, k_]:= (-1)^(n-k)*Binomial[k-n, n-k];
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jan 10 2023 *)
  • PARI
    trg(nn) = {for (n=1, nn, for (k=1, n, print1(binomial(k-n,n-k)*(-1)^(n-k), ", ");); print(););} \\ Michel Marcus, Oct 03 2014
    
  • SageMath
    def A106268(n,k): return (1/2)*(0^(n-k) + (n-k+1)*catalan_number(n-k))
    flatten([[A106268(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jan 10 2023

Formula

T(n, k) = (-1)^(n-k)*binomial(k-n, n-k).
T(n, k) = (1/2)*(0^(n-k) + binomial(2*(n-k), n-k)).
Sum_{k=0..n} T(n, k) = A024718(n) (row sums).
Sum_{k=0..floor(n/2)} T(n-k, k) = A106269(n) (diagonal sums).
Bivariate g.f.: Sum_{n, k >= 0} T(n,k)*x^n*y^k = (1/2) * (1/(1 - x*y)) * (1 + 1/sqrt(1 - 4*x)). - Petros Hadjicostas, Jul 15 2019

A121320 Number of vertices in all ordered (plane) trees with n edges that are at distance two from all the leaves above them.

Original entry on oeis.org

0, 0, 1, 2, 6, 18, 59, 203, 724, 2643, 9802, 36755, 138935, 528406, 2019419, 7748125, 29825844, 115132729, 445498768, 1727434607, 6710501025, 26110567532, 101744332967, 396983837719, 1550777652546, 6064476854065, 23739056348161
Offset: 0

Views

Author

Louis Shapiro, Aug 25 2006

Keywords

Examples

			a(4)=6 since the root has the distance two property for the trees uudduudd and uudududd. There are similar points at height 1 for uuududdd, uuudddud and uduuuddd. The distance two point is at height 2 for uuuudddd.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x^2(1 + 1/Sqrt[1 - 4x])/(2(1 - x - x^2)), {x, 0, 26}], x] (* Robert G. Wilson v, Aug 21 2006 *)
  • PARI
    seq(n)={Vec(x^2*(1 + 1/sqrt(1 - 4*x + O(x^(n-1))))/(2 - 2*x - 2*x^2), -(n+1))} \\ Andrew Howroyd, Apr 06 2020

Formula

G.f.: x^2*(1 + 1/sqrt(1 - 4*x))/(2 - 2*x - 2*x^2). - Reformulated by Georg Fischer, Apr 06 2020
Conjecture: (-n+2)*a(n) +(5*n-12)*a(n-1) +(-3*n+8)*a(n-2) +2*(-2*n+5)*a(n-3)=0. - R. J. Mathar, Jun 22 2016
a(n) ~ 2^(2*n-1) / (11*sqrt(Pi*n)). - Vaclav Kotesovec, Apr 07 2020

Extensions

More terms from Robert G. Wilson v, Aug 21 2006

A122897 Riordan array (1/(1-x), c(x)-1) where c(x) is the g.f. of A000108.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 8, 5, 1, 1, 22, 19, 7, 1, 1, 64, 67, 34, 9, 1, 1, 196, 232, 144, 53, 11, 1, 1, 625, 804, 573, 261, 76, 13, 1, 1, 2055, 2806, 2211, 1171, 426, 103, 15, 1, 1, 6917, 9878, 8399
Offset: 0

Views

Author

Paul Barry, Sep 18 2006

Keywords

Comments

Product of A007318 and A122896. Inverse of Riordan array ((1+x+x^2)/(1+x)^2,x/(1+x)^2). Row sums are A024718.
The n-th row polynomial (in descending powers of x) equals the n-th Taylor polynomial of the rational function (1 - x^2)/(1 + x + x^2) * (1 + x)^(2*n) about 0. For example, for n = 4 we have (1 - x^2)/( 1 + x + x^2) * (1 + x)^8 = (x^4 + 22*x^3 + 19*x^2 + 7*x + 1) + O(x^5). - Peter Bala, Feb 21 2018

Examples

			Triangle begins
  1,
  1,     1,
  1,     3,     1,
  1,     8,     5,     1,
  1,    22,    19,     7,     1,
  1,    64,    67,    34,     9,    1,
  1,   196,   232,   144,    53,   11,    1,
  1,   625,   804,   573,   261,   76,   13,   1,
  1,  2055,  2806,  2211,  1171,  426,  103,  15,   1,
  1,  6917,  9878,  8399,  4979, 2126,  647, 134,  17,  1,
  1, 23713, 35072, 31655, 20483, 9878, 3554, 932, 169, 19, 1
		

Programs

  • Maple
    A122897 := proc (n, k)
      binomial(2*n, n-k) + 2*add(cos((2/3)*Pi*j)*binomial(2*n, n-k-j), j = 1..n-k)
    end proc:
    for n from 0 to 10 do
    seq(A122897(n, k), k = 0..n)
    end do; # Peter Bala, Feb 21 2018

Formula

T(n,k) = binomial(2*n,n-k) + 2*Sum_{j = 1..n-k} cos((2/3)*Pi*j)* binomial(2*n, n-k-j). - Peter Bala, Feb 21 2018
T(n,k) = k*Sum_{i=0..n-k} C(2*(i+k),i)/(i+k), T(n,0)=1. - Vladimir Kruchinin, Jun 13 2020

A124642 Antidiagonal sums of A096465.

Original entry on oeis.org

1, 1, 2, 3, 5, 9, 15, 29, 50, 99, 176, 351, 638, 1275, 2354, 4707, 8789, 17577, 33099, 66197, 125477, 250953, 478193, 956385, 1830271, 3660541, 7030571, 14061141, 27088871, 54177741, 104647631, 209295261, 405187826, 810375651, 1571990936, 3143981871, 6109558586, 12219117171, 23782190486, 47564380971, 92705454896
Offset: 0

Views

Author

Gerald McGarvey, Dec 21 2006

Keywords

Comments

Apparently bisections give A024718 and A006134 and are related to A078478, A100066 and A105848.

Crossrefs

Programs

  • Magma
    a:= func< n | n eq 0 select 1 else (1+(-1)^n)/2 + (&+[ (&+[ ((n-2*j)/(n-2*k))*Binomial(n-2*k, n-k-j) : k in [0..j]]) : j in [0..Floor((n-1)/2)]]) >;
    [a(n): n in [0..45]]; // G. C. Greubel, Apr 30 2021
    
  • Mathematica
    a[, 0]=1; a[n, n_]=1; a[n_, m_]:= a[n, m] = a[n-1, m] + a[n, m-1]; a[n_, m_] /; n<0 || m>n = 0; Table[ Sum[a[n-m, m], {m,0,n}], {n,0,45}] (* Jean-François Alcover, Dec 17 2012 *)
    a[n_]:= a[n]= (1+(-1)^n)/2 + Sum[(n-2*j)*Binomial[n-2*k, n-k-j]/(n-2*k), {j,0,(n-1)/2}, {k,0,j}]; Table[a[n], {n,0,45}] (* G. C. Greubel, Apr 30 2021 *)
  • Sage
    def a(n): return (1+(-1)^n)/2 + sum( sum( ((n-2*j)/(n-2*k))*binomial(n-2*k, n-k-j) for k in (0..j)) for j in (0..(n-1)//2))
    [a(n) for n in (0..45)] # G. C. Greubel, Apr 30 2021

Formula

Conjecture: G.f.: -(1/2)*z*(2*z+(1-4*z^2)^(1/2)+1)/(1-4*z^2)^(1/2)/(z^2-1). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009
From G. C. Greubel, Apr 30 2021: (Start)
a(n) = (1 + (-1)^n)/2 + Sum_{j=0..floor((n-1)/2)} Sum_{k=0..j} (n-2*j)*binomial(n -2*k, n-k-j)/(n-2*k).
a(n) = Sum_{j=0..floor(n/2)} Sum_{k=0..j} ((n-2*j)/(n-k-j))*binomial(n-2*k, n-k-j). (End)

Extensions

Offset changed by Reinhard Zumkeller, Jul 12 2012
Terms a(18) onward added by G. C. Greubel, Apr 30 2021

A360211 a(n) = Sum_{k=0..floor(n/2)} (-1)^k * binomial(2*n-3*k,n-2*k).

Original entry on oeis.org

1, 2, 5, 17, 61, 221, 812, 3021, 11344, 42899, 163146, 623320, 2390653, 9198879, 35494701, 137290466, 532149805, 2066501909, 8038146035, 31312535610, 122140123201, 477002869614, 1864912495716, 7298427590543, 28588888586743, 112080607196843, 439744801379594
Offset: 0

Views

Author

Seiichi Manyama, Jan 30 2023

Keywords

Crossrefs

Programs

  • Maple
    A360211 := proc(n)
        add((-1)^k*binomial(2*n-3*k,n-2*k),k=0..floor(n/2)) ;
    end proc:
    seq(A360211(n),n=0..40) ; # R. J. Mathar, Mar 02 2023
  • PARI
    a(n) = sum(k=0, n\2, (-1)^k*binomial(2*n-3*k, n-2*k));
    
  • PARI
    my(N=30, x='x+O('x^N)); Vec(1/(sqrt(1-4*x)*(1+2*x^2/(1+sqrt(1-4*x)))))

Formula

G.f.: 1 / ( sqrt(1-4*x) * (1 + x^2 * c(x)) ), where c(x) is the g.f. of A000108.
a(n) ~ 2^(2*n+3) / (9*sqrt(Pi*n)). - Vaclav Kotesovec, Feb 18 2023
D-finite with recurrence 2*n*a(n) +(-5*n+2)*a(n-1) +(-11*n+12)*a(n-2) +2*(-n+5)*a(n-3) +(-7*n+2)*a(n-4) +2*(-2*n+5)*a(n-5)=0. - R. J. Mathar, Mar 02 2023

A371785 a(n) = Sum_{k=0..floor(n/2)} (-1)^k * binomial(3*n-k,n-2*k).

Original entry on oeis.org

1, 3, 14, 76, 441, 2652, 16303, 101727, 641630, 4080154, 26112384, 167978615, 1085182436, 7035477777, 45750406205, 298279844724, 1949096816505, 12761551428024, 83701819019155, 549850618355886, 3617119500327536, 23824816811652905, 157106267803712709
Offset: 0

Views

Author

Seiichi Manyama, Apr 06 2024

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n\2, (-1)^k*binomial(3*n-k, n-2*k));

Formula

a(n) = [x^n] 1/((1-x+x^2) * (1-x)^(2*n)).

A371786 a(n) = Sum_{k=0..floor(n/2)} (-1)^k * binomial(4*n-k,n-2*k).

Original entry on oeis.org

1, 4, 27, 209, 1716, 14553, 125971, 1105885, 9809019, 87691592, 788832045, 7131655908, 64743390321, 589808771881, 5389066722654, 49365637128655, 453212161425716, 4168951499299185, 38415242186255419, 354527945536409116, 3276414018301664025
Offset: 0

Views

Author

Seiichi Manyama, Apr 06 2024

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n\2, (-1)^k*binomial(4*n-k, n-2*k));

Formula

a(n) = [x^n] 1/((1-x+x^2) * (1-x)^(3*n)).

A371787 a(n) = Sum_{k=0..floor(n/2)} (-1)^k * binomial(5*n-k,n-2*k).

Original entry on oeis.org

1, 5, 44, 441, 4675, 51129, 570401, 6451688, 73715212, 848793726, 9833394285, 114487194485, 1338411363535, 15700659542105, 184722993467063, 2178831068873601, 25756348168285379, 305061478075705411, 3619402085862708614, 43008294559624639777
Offset: 0

Views

Author

Seiichi Manyama, Apr 06 2024

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n\2, (-1)^k*binomial(5*n-k, n-2*k));

Formula

a(n) = [x^n] 1/((1-x+x^2) * (1-x)^(4*n)).
It appears that a(n) = Sum_{k = 0..n} binomial(3*n+2*k-1, k). - Peter Bala, Jun 04 2024

A101475 Triangle T(n,k) read by rows: number of lattice paths from (0,0) to (0,2n) with steps (1,1) or (1,-1) that stay between the lines y=0 and y=k.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 10, 15, 19, 20, 35, 50, 63, 69, 70, 126, 176, 217, 243, 251, 252, 462, 638, 770, 870, 913, 923, 924, 1716, 2354, 2794, 3159, 3355, 3419, 3431, 3432, 6435, 8789, 10307, 11610, 12430, 12766, 12855, 12869, 12870, 24310, 33099, 38489
Offset: 0

Views

Author

Ralf Stephan, Jan 21 2005

Keywords

Examples

			Triangle begins
     1;
     1,    2;
     3,    5,     6;
    10,   15,    19,    20;
    35,   50,    63,    69,    70;
   126,  176,   217,   243,   251,   252;
   462,  638,   770,   870,   913,   923,   924;
  1716, 2354,  2794,  3159,  3355,  3419,  3431,  3432;
  6435, 8789, 10307, 11610, 12430, 12766, 12855, 12869, 12870;
		

Crossrefs

Left-hand columns include A001700 and A024718. Right-hand columns include A000984 and A030662. Row sums are in A101476.

Programs

  • Mathematica
    T[n_, k_] := Sum[Binomial[2n, n-i(k+2)] - Binomial[2n, n+i(k+2)+k+1], {i, 0, n}]; Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 20 2019 *)

Formula

T(n, k) = Sum_{i>=0} (binomial(2n, n-i*(k+2)) - binomial(2n, n+i*(k+2)+k+1)).

A382225 Triangle read by rows: T(n,k) = Sum_{i=k..n} C(i-1,i-k)*C(i,k).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 7, 1, 1, 10, 25, 13, 1, 1, 15, 65, 73, 21, 1, 1, 21, 140, 273, 171, 31, 1, 1, 28, 266, 798, 871, 346, 43, 1, 1, 36, 462, 1974, 3321, 2306, 631, 57, 1, 1, 45, 750, 4326, 10377, 11126, 5335, 1065, 73, 1, 1, 55, 1155, 8646, 28017, 42878, 31795, 11145, 1693, 91, 1
Offset: 0

Views

Author

Vladimir Kruchinin, Mar 19 2025

Keywords

Comments

Triangle T(n,k) of minors of the main diagonal of Pascal's matrix, n -size matrix, k - number of element of diagonal.

Examples

			Triangle starts:
  1;
  1,  1;
  1,  3,   1;
  1,  6,   7,   1;
  1, 10,  25,  13,   1;
  1, 15,  65,  73,  21,  1;
  1, 21, 140, 273, 171, 31, 1;
  ...
		

Crossrefs

Columns k=0-3 give: A000012, A000217, A001296(n-1) for n>=1, A107963(n-3) for n>=3.
Row sums give A024718.
T(n+1,n) gives A002061(n+1).

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(n<0, 0,
          T(n-1, k)+binomial(n-1, k-1)*binomial(n, k))
        end:
    seq(seq(T(n, k), k=0..n), n=0..10);  # Alois P. Heinz, Mar 20 2025
  • Mathematica
    A382225[n_, k_] := A382225[n, k] = If[k == n, 1, A382225[n-1, k] + Binomial[n-1, k-1]*Binomial[n, k]];
    Table[A382225[n, k], {n, 0, 10}, {k, 0, n}] (* Paolo Xausa, Mar 22 2025 *)
  • Maxima
    h[i,j]:=binomial(i+j-3,i-1);
    for n:1 thru 7 do
        if n=1 then print([1])
        else (M:genmatrix(h,n,n),
              print(makelist(determinant(minor(M,k,k)),k,1,n))
             );

Formula

G.f.: 1/(1-x) * ((1-x*(1-y))/(2*(sqrt((1-x*(1+y))^2-4*x^2*y)))+1/2).
T(n,k) = T(n-1,k)+C(n-1,k-1)*C(n,k).
Previous Showing 21-30 of 34 results. Next