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

A098593 A triangle of Krawtchouk coefficients.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -2, -2, -2, 1, 1, -3, -2, -2, -3, 1, 1, -4, -1, 0, -1, -4, 1, 1, -5, 1, 3, 3, 1, -5, 1, 1, -6, 4, 6, 6, 6, 4, -6, 1, 1, -7, 8, 8, 6, 6, 8, 8, -7, 1, 1, -8, 13, 8, 2, 0, 2, 8, 13, -8, 1, 1, -9, 19, 5, -6, -10, -10, -6, 5, 19, -9, 1, 1, -10, 26, -2, -17, -20, -20, -20, -17, -2, 26, -10, 1, 1, -11, 34, -14, -29, -25
Offset: 0

Views

Author

Paul Barry, Sep 17 2004

Keywords

Comments

Row sums are A009545(n+1), with e.g.f. exp(x)(cos(x)+sin(x)). Diagonal sums are A077948.
The rows are the diagonals of the Krawtchouk matrices. Coincides with the Riordan array (1/(1-x),(1-2x)/(1-x)). - Paul Barry, Sep 24 2004
Corresponds to Pascal-(1,-2,1) array, read by antidiagonals. The Pascal-(1,-2,1) array has n-th row generated by (1-2x)^n/(1-x)^(n+1). - Paul Barry, Sep 24 2004
A modified version (different signs) of this triangle is given by T(n,k) = Sum_{j=0..n} C(n-k,j)*C(k,j)*cos(Pi*(k-j)). - Paul Barry, Jun 14 2007

Examples

			Rows begin {1}, {1,1}, {1,0,1}, {1,-1,-1,1}, {1,-2,-2,-2,1}, ...
From _Paul Barry_, Oct 05 2010: (Start)
Triangle begins
  1,
  1,  1,
  1,  0,  1,
  1, -1, -1,  1,
  1, -2, -2, -2,  1,
  1, -3, -2, -2, -3,  1,
  1, -4, -1,  0, -1, -4,  1,
  1, -5,  1,  3,  3,  1, -5,  1,
  1, -6,  4,  6,  6,  6,  4, -6,  1,
  1, -7,  8,  8,  6,  6,  8,  8, -7,  1,
  1, -8, 13,  8,  2,  0,  2,  8, 13, -8,  1
Production matrix (related to large Schroeder numbers A006318) begins
  1,     1,
  0,    -1,     1,
  0,    -2,    -1,    1,
  0,    -6,    -2,   -1,   1,
  0,   -22,    -6,   -2,  -1,   1,
  0,   -90,   -22,   -6,  -2,  -1,  1,
  0,  -394,   -90,  -22,  -6,  -2, -1,  1,
  0, -1806,  -394,  -90, -22,  -6, -2, -1,  1,
  0, -8558, -1806, -394, -90, -22, -6, -2, -1, 1
Production matrix of inverse is
    -1,   1,
    -2,   1,  1,
    -4,   2,  1,  1,
    -8,   4,  2,  1,  1,
   -16,   8,  4,  2,  1, 1,
   -32,  16,  8,  4,  2, 1, 1,
   -64,  32, 16,  8,  4, 2, 1, 1,
  -128,  64, 32, 16,  8, 4, 2, 1, 1,
  -256, 128, 64, 32, 16, 8, 4, 2, 1, 1 (End)
		

References

  • P. Feinsilver and J. Kocik, Krawtchouk matrices from classical and quantum walks, Contemporary Mathematics, 287 2001, pp. 83-96.

Crossrefs

Cf. Pascal (1,m,1) array: A123562 (m = -3), A000012 (m = -1), A007318 (m = 0), A008288 (m = 1), A081577 (m = 2), A081578 (m = 3), A081579 (m = 4), A081580 (m = 5), A081581 (m = 6), A081582 (m = 7), A143683 (m = 8).

Programs

  • Mathematica
    T[n_, k_] := Sum[Binomial[n - k, k - j]*Binomial[k, j]*(-1)^(k - j), {j, 0, n}]; Table[T[n, k], {n, 0, 49}, {k, 0, n}] // Flatten (* G. C. Greubel, Oct 15 2017 *)
  • PARI
    for(n=0,10, for(k=0,n, print1(sum(i=0,k, binomial(n-k, k-i) *binomial(k, i)*(-1)^(k-i)), ", "))) \\ G. C. Greubel, Oct 15 2017

Formula

T(n, k) = Sum_{i=0..k} binomial(n-k, k-i)*binomial(k, i)*(-1)^(k-i), k<=n.
T(n, k) = T(n-1, k) + T(n-1, k-1) - 2*T(n-2, k-1) (n>0). - Paul Barry, Sep 24 2004
T(n, k) = [k<=n]*Hypergeometric2F1(-k,k-n;1;-1). - Paul Barry, Jan 24 2011
E.g.f. for the n-th subdiagonal: exp(x)*P(n,x), where P(n,x) is the polynomial Sum_{k = 0..n} (-1)^k*binomial(n,k)* x^k/k!. For example, the e.g.f. for the second subdiagonal is exp(x)*(1 - 2*x + x^2/2) = 1 - x - 2*x^2/2! - 2*x^3/3! - x^4/4! + x^5/5! + .... - Peter Bala, Mar 05 2017

A077971 Expansion of 1/(1+x-x^2-2*x^3).

Original entry on oeis.org

1, -1, 2, -1, 1, 2, -3, 7, -6, 7, 1, -6, 21, -25, 34, -17, 1, 50, -83, 135, -118, 87, 65, -214, 453, -537, 562, -193, -319, 1250, -1955, 2567, -2022, 679, 2433, -5798, 9589, -10521, 8514, 143, -12671, 29842, -42227, 46727, -29270, -8457, 72641, -139638, 195365, -189721, 105810, 95199, -368831
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Cf. A077948.
First differences of A077901.

Programs

  • GAP
    a:=[1,-1,2];; for n in [4..60] do a[n]:=-a[n-1]+a[n-2]+2*a[n-3]; od; a; # G. C. Greubel, Jun 24 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 60); Coefficients(R!( 1/(1+x-x^2-2*x^3) )); // G. C. Greubel, Jun 24 2019
    
  • Mathematica
    LinearRecurrence[{-1,1,2}, {1,-1,2}, 60] (* or *) CoefficientList[Series[ 1/(1 +x-x^2-2*x^3), {x,0,60}], x] (* G. C. Greubel, Jun 24 2019 *)
  • PARI
    Vec(1/(1+x-x^2-2*x^3)+O(x^60)) \\ Charles R Greathouse IV, Sep 26 2012
    
  • Sage
    (1/(1+x-x^2-2*x^3)).series(x, 60).coefficients(x, sparse=False) # G. C. Greubel, Jun 24 2019
    

Formula

a(n) = (-1)^n * A077948(n). - G. C. Greubel, Jun 24 2019

A078011 Expansion of (1-x)/(1-x-x^2+2*x^3).

Original entry on oeis.org

1, 0, 1, -1, 0, -3, -1, -4, 1, -1, 8, 5, 15, 4, 9, -17, -16, -51, -33, -52, 17, 31, 152, 149, 239, 84, 25, -369, -512, -931, -705, -612, 545, 1343, 3112, 3365, 3791, 932, -2007, -8657, -12528, -17171, -12385, -4500, 17457, 37727, 64184, 66997, 55727, -5644, -83911, -201009, -273632, -306819
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Cf. A077948.

Programs

  • GAP
    a:=[1,0,1];; for n in [4..60] do a[n]:=a[n-1]+a[n-2]-2*a[n-3]; od; a; # G. C. Greubel, Jun 28 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 60); Coefficients(R!( (1-x)/(1-x-x^2+2*x^3) )); // G. C. Greubel, Jun 28 2019
    
  • Mathematica
    CoefficientList[Series[(1-x)/(1-x-x^2+2x^3),{x,0,60}],x] (* or *) LinearRecurrence[ {1,1,-2},{1,0,1},60] (* Harvey P. Dale, May 04 2013 *)
  • PARI
    my(x='x+O('x^60)); Vec((1-x)/(1-x-x^2+2*x^3)) \\ G. C. Greubel, Jun 28 2019
    
  • Sage
    ((1-x)/(1-x-x^2+2*x^3)).series(x, 60).coefficients(x, sparse=False) # G. C. Greubel, Jun 28 2019
    

Formula

a(0)=1, a(1)=0, a(2)=1, a(n) = a(n-1) + a(n-2) - 2*a(n-3). - Harvey P. Dale, May 04 2013
a(n) = A077948(n) - A077948(n-1). - R. J. Mathar, Nov 07 2015

A099038 Diagonal sums of a Krawtchouk triangle.

Original entry on oeis.org

1, 1, 0, 1, 5, 6, 3, 13, 42, 55, 55, 162, 413, 591, 810, 2001, 4451, 6900, 11091, 24795, 51030, 84337, 147253, 309666, 610695, 1058041, 1928646, 3903175, 7528741, 13480380, 25126093, 49640405, 94739568, 173440389, 326974495, 636424008
Offset: 0

Views

Author

Paul Barry, Sep 23 2004

Keywords

Comments

Diagonal sums of A099037.

Crossrefs

Cf. A077948.

Programs

  • Mathematica
    Table[Sum[Binomial[n - k, k]*Sum[(-1)^i*Binomial[k, i]*Binomial[n - 2*k, k - i], {i, 0, n}], {k, 0, Floor[n/2]}], {n,0,50}] (* G. C. Greubel, Dec 31 2017 *)
  • PARI
    for(n=0,30, print1(sum(k=0,floor(n/2), binomial(n-k,k)*sum(i=0,n,(-1)^i*binomial(k,i)*binomial(n-2*k,k-i))), ", ")) \\ G. C. Greubel, Dec 31 2017

Formula

a(n) = Sum_{k=0..floor(n/2)} C(n-k, k)*Sum_{i=0..n} (-1)^i*C(k, i) * C(n-2k, k-i).
Conjecture: n*a(n) -n*a(n-1) +n*a(n-2) +3*(-n+1)*a(n-3) +(-5*n+13)*a(n-4) +(n-3)*a(n-5)=0. - R. J. Mathar, Dec 21 2014

A117355 Riordan array (1/(1-x^2),x(1-2x^2)/(1-x^2)).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, -1, 0, 1, 0, -1, 0, -2, 0, 1, 1, 0, -2, 0, -3, 0, 1, 0, -2, 0, -2, 0, -4, 0, 1, 1, 0, -2, 0, -1, 0, -5, 0, 1, 0, -3, 0, 0, 0, 1, 0, -6, 0, 1, 1, 0, -1, 0, 3, 0, 4, 0, -7, 0, 1, 0, -4, 0, 3, 0, 6, 0, 8, 0, -8, 0, 1, 1, 0, 1, 0, 6, 0, 8, 0, 13, 0, -9, 0, 1
Offset: 0

Views

Author

Paul Barry, Mar 09 2006

Keywords

Comments

Row sums are A077948.
Diagonal sums are the aerated version of A009545 with g.f. 1/(1-2x^2+2x^4).

Examples

			Triangle begins
1,
0, 1,
1, 0, 1,
0, 0, 0, 1,
1, 0, -1, 0, 1,
0, -1, 0, -2, 0, 1,
1, 0, -2, 0, -3, 0, 1,
0, -2, 0, -2, 0, -4, 0, 1
		

Formula

Number triangle T(n,k)=sum{j=0..n-k, C(j-(n-k)/2-1,j)C(k,j)(1+(-1)^(n-k))/2}
T(n,k)=T(n-1,k-1)+T(n-2,k)-2*T(n-3,k-1), T(0,0)=T(1,1)=T(2,0)=T(2,2)=1, T(1,1)=T(2,1)=0, T(n,k)=0 if k<0 or if k>n. - Philippe Deléham, Jan 16 2014
Showing 1-5 of 5 results.