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-27 of 27 results.

A128316 Triangle read by rows: A000012 * A128315 as infinite lower triangular matrices.

Original entry on oeis.org

1, 1, 1, 3, -1, 1, 2, 3, -2, 1, 4, -1, 4, -3, 1, 4, 3, -5, 7, -4, 1, 6, -3, 10, -13, 11, -5, 1, 4, 8, -14, 23, -24, 16, -6, 1, 7, -2, 15, -33, 46, -40, 22, -7, 1, 7, 4, -15, 47, -79, 86, -62, 29, -8, 1, 9, -6, 30, -73, 131, -166, 148, -91, 37, -9, 1, 7, 12, -37, 103, -204, 297, -314, 239, -128, 46, -10, 1
Offset: 1

Views

Author

Gary W. Adamson, Feb 25 2007

Keywords

Comments

A128316 * [1,2,3...] = A000034: [1,2,1,2,...].

Examples

			First few rows of the triangle:
  1;
  1,  1;
  3, -1,   1;
  2,  3   -2,   1;
  4, -1,   4,  -3,   1;
  4,  3,  -5,   7,  -4,  1;
  6, -3,  10, -13,  11, -5,  1;
  4,  8, -14,  23, -24, 16, -6, 1;
  ...
		

Crossrefs

Sums include: A000027 (row), A032766, A047215, A344817 (alternating sign).

Programs

  • Magma
    A128316:= func< n,k | (&+[(-1)^(j+k)*Floor(n/j)*Binomial(j-1,k-1): j in [k..n]]) >;
    [A128316(n,k): k in [1..n], n in [1..15]]; // G. C. Greubel, Jun 23 2024
    
  • Mathematica
    T[n_, k_]:= Sum[(-1)^(j+k)*Floor[n/j]*Binomial[j-1,k-1], {j,k,n}];
    Table[T[n,k], {n,15}, {k,n}]//Flatten (* G. C. Greubel, Jun 23 2024 *)
  • SageMath
    def A128316(n,k): return sum((-1)^(j+k)*int(n//j)*binomial(j-1,k-1) for j in range(k,n+1))
    flatten([[A128316(n,k) for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Jun 23 2024

Formula

Sum_{k=1..n} T(n, k) = A000027(n) (row sums).
T(n, 1) = A059851(n).
From G. C. Greubel, Jun 23 2024: (Start)
T(n, k) = A010766(n,k) * AA130595(n-1, k-1) as infinite lower triangular matrices.
T(n, k) = Sum_{j=k..n} (-1)^(j+k) * floor(n/j) * binomial(j-1, k-1).
T(2*n-1, n) = (-1)^(n-1)*A026641(n).
T(2*n-2, n-1) = (-1)^n*A014300(n-1), for n >= 2.
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = A344817(n).
Sum_{k=1..n} k*T(n, k) = A032766(n-1).
Sum_{k=1..n} (k+1)*T(n, k) = A047215(n). (End)

Extensions

a(28) = 1 inserted and more terms from Georg Fischer, Jun 06 2023

A096793 Triangle read by rows: a(n,k) is the number of Dyck n-paths containing k odd-length ascents.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 4, 0, 1, 3, 0, 10, 0, 1, 0, 21, 0, 20, 0, 1, 12, 0, 84, 0, 35, 0, 1, 0, 120, 0, 252, 0, 56, 0, 1, 55, 0, 660, 0, 630, 0, 84, 0, 1, 0, 715, 0, 2640, 0, 1386, 0, 120, 0, 1, 273, 0, 5005, 0, 8580, 0, 2772, 0, 165, 0, 1, 0, 4368, 0, 25025, 0, 24024, 0, 5148, 0, 220, 0, 1
Offset: 0

Views

Author

David Callan, Aug 17 2004

Keywords

Comments

a(n,k)=0 unless k and n have the same parity and 0 <= k <= n.
From Emeric Deutsch, Oct 05 2008: (Start)
Sum_{k=0..n} k*a(n,k) = A014300(n).
For the case of even-length ascents see A143950. (End)

Examples

			Table begins
.
n |k = 0    1    2    3    4    5    6    7    8
--+---------------------------------------------
0 |    1
1 |    0,   1
2 |    1,   0,   1
3 |    0,   4,   0,   1
4 |    3,   0,  10,   0,   1
5 |    0,  21,   0,  20,   0,   1
6 |   12,   0,  84,   0,  35,   0,   1
7 |    0, 120,   0, 252,   0,  56,   0,   1
8 |   55,   0, 660,   0, 630,   0,  84,   0,   1
.
a(4,0)=3 because the Dyck 4-paths containing no odd-length ascents are UUUUDDDD,UUDUUDDD,UUDDUUDD.
		

Crossrefs

The nonzero entries in column k=0 give A001764, in k=1 give A045721, in k=2 give A090763. The row sums are the Catalan numbers A000108.
Cf. A143950. - Emeric Deutsch, Oct 05 2008

Programs

  • Mathematica
    bi[n_, k_] := If[IntegerQ[k], Binomial[n, k], 0]; TableForm[Table[bi[(n+k)/2, (n-k)/2]bi[(3n-k)/2+1, (n+k)/2]/((3n-k)/2+1), {n, 0, 10}, {k, 0, n}]]

Formula

a(n, k) = binomial((n+k)/2, (n-k)/2)*binomial((3n-k)/2+1, (n+k)/2)/((3n-k)/2+1).
Equivalently, a(2n+k, k) = binomial(3n+k, k)*T(n) where T(n) = binomial(3n, n)/(2n+1) is A001764. Proof: Given a Dyck (2n+k)-path with k ascents of odd length, delete the peaks (UD) that terminate odd-length ascents. This is a mapping to Dyck (2n)-paths all of whose ascents have even length; there are T[n] such paths. The mapping is clearly onto and is binomial(3n+k, k)-to-1 as follows. A Dyck (2n)-path all of whose ascents have even length has exactly 3n+1 vertices that are (i) not incident with an upstep, or (ii) incident with an upstep and at even distance (possibly 0) from the start of the ascent they lie in. The k deleted UDs can be inserted arbitrarily at these vertices, repetition allowed, to get the preimages -- binomial(3n+k, k) choices.
G.f.: G(z, t) + H(z, t) where G satisfies G^3*(t^2 - 1)*z^2 - G^2*t*z*(2 + t*z) + G*(1 + 2*t*z) - 1 = 0 and H satisfies H^3*(t^2 - 1)*z^2 + H^2*t*z*(2 + t*z) - H*t^2*(1 - t*z) + t^3*z = 0. Here z marks size (n) and t marks number of odd-length ascents (k). G is gf for paths that start with an even-length ascent and H is gf for paths that start with an odd-length ascent. - David Callan, Sep 03 2005
From Emeric Deutsch, Oct 05 2008: (Start)
G.f. G=G(t,z) satisfies G = 1 + zG(t + zG)/(1 - z^2*G^2).
The trivariate g.f. H=H(t,s,z), where t(s) marks odd-length (even-length) ascents satisfies H = 1 + zH(t+szH)/(1-z^2*H^2). (End)

A124392 A Fine number related number triangle.

Original entry on oeis.org

1, 2, 1, 7, 2, 1, 24, 8, 2, 1, 86, 28, 9, 2, 1, 314, 103, 32, 10, 2, 1, 1163, 382, 121, 36, 11, 2, 1, 4352, 1432, 456, 140, 40, 12, 2, 1, 16414, 5408, 1732, 536, 160, 44, 13, 2, 1, 62292, 20546, 6608, 2064, 622, 181, 48, 14, 2, 1, 237590, 78436, 25314, 7960, 2429, 714, 203, 52, 15, 2, 1
Offset: 0

Views

Author

Paul Barry, Oct 30 2006

Keywords

Comments

First column is A014300. Second column is A114590. Row sums are A001700. Array is given by (f(x)/(x*sqrt(1-4x)), f(x)) where f(x) is g.f. of Fine numbers A000957.

Examples

			Triangle begins
      1;
      2,    1;
      7,    2,    1;
     24,    8,    2,   1;
     86,   28,    9,   2,   1;
    314,  103,   32,  10,   2,  1;
   1163,  382,  121,  36,  11,  2,  1;
   4352, 1432,  456, 140,  40, 12,  2, 1;
  16414, 5408, 1732, 536, 160, 44, 13, 2, 1;
		

Crossrefs

Programs

  • GAP
    Flat(List([0..10], n-> List([0..n], k-> Binomial(n-j, k)*Binomial(2*j, n-k) ))); # G. C. Greubel, Dec 25 2019
  • Magma
    [(&+[Binomial(n-j, k)*Binomial(2*j, n-k): j in [0..n-k]]): k in [0..n], n in [0.10]]; // G. C. Greubel, Dec 25 2019
    
  • Maple
    seq(seq( add(binomial(n-j, k)*binomial(2*j, n-k), j=0..n-k), k=0..n), n=0..10); # G. C. Greubel, Dec 25 2019
  • Mathematica
    Table[Sum[Binomial[n-j, k]*Binomial[2*j, n-k], {j,0,n-k}], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Dec 25 2019 *)
  • PARI
    T(n,k) = sum(j=0, n-k, binomial(n-j, k)*binomial(2*j, n-k)); \\ G. C. Greubel, Dec 25 2019
    
  • Sage
    [[sum(binomial(n-j, k)*binomial(2*j, n-k) for j in (0..n-k)) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Dec 25 2019
    

Formula

Riordan array ( 1/(x*sqrt(1-4*x)) * (1-sqrt(1-4*x))/(3-sqrt(1-4*x)), (1-sqrt(1-4*x))/(3-sqrt(1-4*x)) ).
Number triangle T(n, k) = Sum_{j=0..n-k} C(n-j, k)*C(2*j, n-k).

A188289 Binomial sum related to rooted trees.

Original entry on oeis.org

0, 2, 3, 14, 45, 167, 609, 2270, 8517, 32207, 122463, 467843, 1794195, 6903353, 26635773, 103020254, 399300165, 1550554583, 6031074183, 23493410759, 91638191235, 357874310213, 1399137067683, 5475504511859, 21447950506395, 84083979575117
Offset: 0

Views

Author

Olivier Gérard, Aug 19 2012

Keywords

Crossrefs

Programs

  • GAP
    List([0..30], n-> Binomial(2*n,n) -(-1)^n -Sum([0..n-1], k-> Binomial(2*k,n-1))); # G. C. Greubel, Apr 29 2019
  • Magma
    [n eq 0 select 0 else Binomial(2*n, n) -(-1)^n - (&+[Binomial(2*k, n-1): k in [0..n-1]]): n in [0..30]]; // G. C. Greubel, Apr 29 2019
    
  • Mathematica
    Table[Binomial[2n,n]-(-1)^n-Sum[Binomial[2k,n-1],{k,0,n-1}],{n,0,30}] (* Harvey P. Dale, Dec 10 2012 *)
  • PARI
    {a(n) = binomial(2*n,n) -(-1)^n -sum(k=0,n-1, binomial(2*k,n-1))}; \\ G. C. Greubel, Apr 29 2019
    
  • Sage
    [binomial(2*n,n) -(-1)^n -sum(binomial(2*k, n-1) for k in (0..n-1)) for n in (0..30)] # G. C. Greubel, Apr 29 2019
    

Formula

a(n) = binomial(2*n,n) - (-1)^n - Sum_{k=0..n-1} binomial(2*k, n-1).
a(n) = Sum_{k=1..n} binomial(n+k,k)*(Sum_{r=n-k..n} (-1)^r*binomial(n-k, r)).
a(n) = (-1)^n*2^(-(1+n))*(1 - 2^(1+n) + (-2)^n*binomial(2+2*n, 1+n) * hypergeometric2F1(1, 2+2*n; 2+n; -1)).

A201635 Triangle formed by T(n,n) = (-1)^n*Sum_{j=0..n} C(-n,j), T(n,k) = Sum_{j=0..k} T(n-1,j) for k=0..n-1, and n>=0, read by rows.

Original entry on oeis.org

1, 1, 0, 1, 1, 2, 1, 2, 4, 6, 1, 3, 7, 13, 22, 1, 4, 11, 24, 46, 80, 1, 5, 16, 40, 86, 166, 296, 1, 6, 22, 62, 148, 314, 610, 1106, 1, 7, 29, 91, 239, 553, 1163, 2269, 4166, 1, 8, 37, 128, 367, 920, 2083, 4352, 8518, 15792, 1, 9, 46, 174, 541, 1461, 3544, 7896
Offset: 0

Views

Author

Peter Luschny, Nov 14 2012

Keywords

Comments

Notation: If a sequence id is starred then the offset and/or some terms are different. Starred terms indicate the variance.
Row sums: [A026641 ] [1, 1, 4, 13, 46, 166, 610]
--
T(j+2, 2) [A000124*] [1*, 2 , 4, 7, 11, 16, 22]
T(j+3, 3) [A003600*] [1*, 2*, 6, 13, 24, 40, 62]
--
T(j , j) [A072547 ] [1, 0, 2, 6, 22, 80, 296]
T(j+1, j) [A026641 ] [1, 1, 4, 13, 46, 166, 610]
T(j+2, j) [A014300 ] [1, 2, 7, 24, 86, 314, 1163]
T(j+3, j) [A014301*] [1, 3, 11, 40, 148, 553, 2083]
T(j+4, j) [A172025 ] [1, 4, 16, 62, 239, 920, 3544]
T(j+5, j) [A172061 ] [1, 5, 22, 91, 367, 1461, 5776]
T(j+6, j) [A172062 ] [1, 6, 29, 128, 541, 2232, 9076]
T(j+7, j) [A172063 ] [1, 7, 37, 174, 771, 3300, 13820]
--
T(2j ,j) [Central ] [1, 1, 7, 40, 239, 1461, 9076]
T(2j+1,j) [A183160 ] [1, 2, 11, 62, 367, 2232, 13820]
T(2j+2,j) [ ] [1, 3, 16, 91, 541, 3300, 20476]
T(2j+3,j) [A199033*] [1, 4, 22, 128, 771, 4744, 29618]

Examples

			Triangle begins as:
[n]|k->
[0] 1
[1] 1, 0
[2] 1, 1,  2
[3] 1, 2,  4,  6
[4] 1, 3,  7, 13,  22
[5] 1, 4, 11, 24,  46,  80
[6] 1, 5, 16, 40,  86, 166, 296
[7] 1, 6, 22, 62, 148, 314, 610, 1106.
		

Programs

  • Maple
    A201635 := proc(n,k) option remember; local j;
    if n=k then (-1)^n*add(binomial(-n,j), j=0..n)
    else add(A201635(n-1,j), j=0..k) fi end:
    for n from 0 to 7 do seq(A(n,k), k=0..n) od;
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==n, (-1)^n*Sum[Binomial[-n, j], {j, 0, n}], Sum[T[n-1, j], {j, 0, k}]]; Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 27 2019 *)
  • PARI
    {T(n,k) = if(k==n, (-1)^n*sum(j=0,n, binomial(-n,j)), sum(j=0,k, T(n-1,j)))};
    for(n=0,10, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Feb 27 2019
  • Sage
    @CachedFunction
    def A201635(n, k):
        if n==k: return (-1)^n*add(binomial(-n, j) for j in (0..n))
        return add(A201635(n-1, j) for j in (0..k))
    for n in (0..7) : [A201635(n, k) for k in (0..n)]
    

A360149 a(n) = Sum_{k=0..floor(n/2)} binomial(2*n+k,n-2*k).

Original entry on oeis.org

1, 2, 7, 27, 107, 429, 1731, 7012, 28478, 115864, 471991, 1924483, 7852083, 32053208, 130893949, 534673600, 2184482707, 8926392419, 36479840422, 149095843951, 609400587426, 2490900041118, 10181669553847, 41618414303969, 170118507902985, 695366323719302
Offset: 0

Views

Author

Seiichi Manyama, Jan 28 2023

Keywords

Crossrefs

Programs

  • Maple
    A360149 := proc(n)
        add(binomial(2*n+k,n-2*k),k=0..floor(n/2)) ;
    end proc:
    seq(A360149(n),n=0..40) ; # R. J. Mathar, Mar 02 2023
  • Mathematica
    a[n_] := Sum[Binomial[2*n + k, n - 2*k], {k, 0, Floor[n/2]}]; Array[a, 26, 0] (* Amiram Eldar, Jan 28 2023 *)
  • PARI
    a(n) = sum(k=0, n\2, binomial(2*n+k, n-2*k));
    
  • PARI
    my(N=30, x='x+O('x^N)); Vec(1/(sqrt(1-4*x)*(1-x^2*(2/(1+sqrt(1-4*x)))^5)))

Formula

G.f.: 1 / ( sqrt(1-4*x) * (1 - x^2 * c(x)^5) ), where c(x) is the g.f. of A000108.
a(n) ~ sqrt((7 - 5*(2/(173 + 21*sqrt(69)))^(1/3) + ((173 + 21*sqrt(69))/2)^(1/3)) / 69) / ((4 - (2/(25 - 3*sqrt(69)))^(1/3) - ((25 - 3*sqrt(69))/2)^(1/3))/3)^n. - Vaclav Kotesovec, Jan 28 2023
D-finite with recurrence n*(47*n-1011)*a(n) +(-261*n^2 +8567*n -6378)*a(n-1) +2*(-165*n^2 -9388*n +16143)*a(n-2) +(3089*n^2 +919*n -27492)*a(n-3) +2*(-1283*n^2 +3900*n +3981)*a(n-4) +4*(81*n+11)*(2*n-9)*a(n-5)=0. - R. J. Mathar, Mar 02 2023

A303952 a(n) is the number of monic polynomials P(z) of degree n over the complex numbers such that P(z) divides P(z^2).

Original entry on oeis.org

1, 2, 5, 17, 69, 302, 1367, 6302, 29401, 138356, 655425, 3121439, 14930541, 71675840, 345148893, 1666432817, 8064278289, 39103576700, 189949958333, 924163714217, 4502711570989, 21966152501240, 107284324830303
Offset: 0

Views

Author

Jianing Song, May 03 2018

Keywords

Comments

Note that if z_0 is a root of P(z), so is (z_0)^2, so |z_0| must equal to 0 or 1. As a result, all such polynomials must have the form P(z) = z^d_0 * Product_{j=1..k} (z - exp(2*Pi*i*q_j))^d_j, where Sum_{j=0..k} d_j = n and {q_1, q_2, ..., q_k} is a set of k rational numbers on [0,1) such that if x belongs to it, the fractional part of 2x also belongs to it. That explains the formula a(n) = Sum_{k=1..n} binomial(n,k)*A014300(k) + 1 in the formula section, the "+1" represents the case d_0 = n and k = 0 corresponding to the polynomial P(z) = z^n.

Examples

			For n = 0, P(z) = 1.
For n = 1, P(z) = z or z - 1.
For n = 2, P(z) = z^2, z^2 - 1, z^2 - 2z + 1, z^2 + z or z^2 + z + 1.
		

Crossrefs

Programs

  • PARI
    x='x+O('x^50); Vec(2*x/(1-6*x+5*x^2+(1+x)*sqrt(1-6*x+5*x^2))+1/(1-x))

Formula

a(n) = Sum_{k=1..n} binomial(n,k)*A014300(k) + 1. The "+1" represents the polynomial P(z) = z^n.
a(n) = A128730(n+1) + 1.
G.f.: 2x/(1-6x+5x^2+(1+x)sqrt(1-6x+5x^2)) + 1/(1-x).
D-finite with recurrence: +2*n*a(n) +(-13*n+4)*a(n-1) +2*(7*n+3)*a(n-2) +8*(n-7)*a(n-3) +2*(-8*n+33)*a(n-4) +5*(n-4)*a(n-5)=0. - R. J. Mathar, Jan 27 2020
D-finite with recurrence 2*n*a(n) +(-11*n+2)*a(n-1) +(3*n+19)*a(n-2) +(11*n-40)*a(n-3) +5*(-n+3)*a(n-4) +4=0. - R. J. Mathar, Aug 01 2022
Previous Showing 21-27 of 27 results.