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

A025564 Triangular array, read by rows: pairwise sums of trinomial array A027907.

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 4, 3, 1, 1, 4, 8, 10, 8, 4, 1, 1, 5, 13, 22, 26, 22, 13, 5, 1, 1, 6, 19, 40, 61, 70, 61, 40, 19, 6, 1, 1, 7, 26, 65, 120, 171, 192, 171, 120, 65, 26, 7, 1, 1, 8, 34, 98, 211, 356, 483, 534, 483, 356, 211, 98, 34, 8, 1, 1, 9, 43, 140, 343, 665, 1050, 1373
Offset: 0

Views

Author

Keywords

Comments

Counting the top row as row 0, T(n,k) is the number of strings of nonnegative integers "s(1)s(2)s(3)...s(k)" such that s(1)+s(2)+s(3)+...+s(k) = n and the string does not contain the substring "00". E.g., T(3,5) = 8 because the valid strings are 02010, 01020, 11010, 10110, 10101, 01110, 01101 and 01011. T(4,3) = 13, counting 040, 311, 301, 130, 031, 103, 013, 220, 202, 022, 211, 121 and 112. - Jose Luis Arregui (arregui(AT)unizar.es), Dec 05 2007

Examples

			                  1
              1   2   1
          1   3   4   3   1
      1   4   8  10   8   4   1
  1   5  13  22  26  22  13   5   1
		

Crossrefs

Columns include A025565, A025566, A025567, A025568.
Cf. A025177.

Programs

  • Mathematica
    T[, 0] = 1; T[1, 1] = 2; T[n, k_] /; 0 <= k <= 2n := T[n, k] = T[n-1, k-2] + T[n-1, k-1] + T[n-1, k]; T[, ] = 0;
    Table[T[n, k], {n, 0, 10}, {k, 0, 2n}] // Flatten (* Jean-François Alcover, Jul 22 2018 *)
  • PARI
    {T(n, k) = if( k<0 || k>2*n, 0, if( n==0, 1, if( n==1, [1,2,1][k+1], if( n==2, [1,3,4,3,1][k+1], T(n-1, k-2) + T(n-1, k-1) + T(n-1, k)))))};
    
  • PARI
    T(n,k)=polcoeff(Ser(polcoeff(Ser((1+y*z)/(1-z*(1+y+y^2)),y),k,y),z),n,z)
    
  • PARI
    {T(n, k) = if( k<0 || k>2*n, 0, if(n==0, 1, polcoeff( (1 + x + x^2)^n, k)+ polcoeff( (1 + x + x^2)^(n-1), k-1)))};

Formula

T(n, k) = T(n-1, k-2) + T(n-1, k-1) + T(n-1, k), starting with [1], [1, 2, 1], [1, 3, 4, 3, 1].
G.f.: (1+yz)/[1-z(1+y+y^2)].

Extensions

Edited by Ralf Stephan, Jan 09 2005
Edited by Clark Kimberling, Jun 20 2012

A114422 Riordan array (1/sqrt(1-2*x-3*x^2), M(x)-1) where M(x) is the g.f. of the Motzkin numbers A001006.

Original entry on oeis.org

1, 1, 1, 3, 3, 1, 7, 9, 5, 1, 19, 26, 19, 7, 1, 51, 75, 65, 33, 9, 1, 141, 216, 211, 132, 51, 11, 1, 393, 623, 665, 483, 235, 73, 13, 1, 1107, 1800, 2058, 1674, 963, 382, 99, 15, 1, 3139, 5211, 6294, 5598, 3663, 1739, 581, 129, 17, 1, 8953, 15115, 19095, 18261, 13243
Offset: 0

Views

Author

Paul Barry, Feb 12 2006

Keywords

Comments

First column is central trinomial numbers A002426.
Second column is A005774.
Third column is A025568.
Row sums are A116387.
Diagonal sums are A116388.
Product of A007318 and A116382.
Column k has e.g.f. exp(x)*Sum_{j=0..k} C(k,j)*Bessel_I(k+j,2*x).

Examples

			Triangle begins
1,
1, 1,
3, 3, 1,
7, 9, 5, 1,
19, 26, 19, 7, 1,
51, 75, 65, 33, 9, 1,
141, 216, 211, 132, 51, 11, 1
		

Programs

  • GAP
    T:=Flat(List([0..10], n->List([0..n], k->Sum([0..n], j-> Binomial(n, j-k)*Binomial(j, n-j))))); # G. C. Greubel, Dec 15 2018
  • Magma
    [[(&+[Binomial(n, j-k)*Binomial(j, n-j): j in [0..n]]): k in [0..n]]: n in [0..10]]; // G. C. Greubel, Dec 15 2018
    
  • Mathematica
    T[n_, k_] := Sum[Binomial[n, j - k]*Binomial[j, n - j], {j,0,n}]; Table[T[n, k], {n,0,10}, {k,0,n}] // Flatten (* G. C. Greubel, Feb 28 2017 *)
  • PARI
    {T(n,k) = sum(j=0,n, binomial(n, j-k)*binomial(j, n-j))};
    for(n=0, 10, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Dec 15 2018
    
  • Sage
    [[sum(binomial(n, j-k)*binomial(j, n-j) for j in range(n+1)) for k in range(n+1)] for n in range(10)] # G. C. Greubel, Dec 15 2018
    

Formula

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

A025181 a(n) = number of (s(0), s(1), ..., s(n)) such that s(i) is an integer, s(0) = 0, |s(1)| = 1, |s(i) - s(i-1)| <= 1 for i >= 2, s(n) = 3. Also a(n) = T(n,n-3), where T is the array defined in A025177.

Original entry on oeis.org

1, 3, 11, 35, 111, 343, 1050, 3186, 9615, 28897, 86592, 258908, 772863, 2304225, 6863496, 20429784, 60779403, 180751617, 537386595, 1597372371, 4747537641, 14108988509, 41928203694, 124598731750, 370279082745, 1100428538391, 3270534249843
Offset: 3

Views

Author

Keywords

Crossrefs

Cf. A025568.
First differences of A014532. First differences are in A026070.

Formula

Conjecture: +(n+3)*a(n) +(-5*n-7)*a(n-1) +(3*n-7)*a(n-2) +(11*n-7)*a(n-3) +4*(-n+6)*a(n-4) +6*(-n+5)*a(n-5)=0. - R. J. Mathar, Feb 25 2015
Conjecture: -(n+3)*(n-3)*(4*n^2-12*n+17)*a(n) +(n-1)*(8*n^3-20*n^2+30*n-81)*a(n-1) +3*(n-1)*(n-2)*(4*n^2-4*n+9)*a(n-2)=0. - R. J. Mathar, Feb 25 2015
Showing 1-3 of 3 results.