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

A084614 Triangle, read by rows, where the n-th row lists the (2*n+1) coefficients of (1 + x - 3*x^2)^n.

Original entry on oeis.org

1, 1, 1, -3, 1, 2, -5, -6, 9, 1, 3, -6, -17, 18, 27, -27, 1, 4, -6, -32, 19, 96, -54, -108, 81, 1, 5, -5, -50, 5, 211, -15, -450, 135, 405, -243, 1, 6, -3, -70, -30, 366, 181, -1098, -270, 1890, -243, -1458, 729, 1, 7, 0, -91, -91, 546, 637, -2015, -1911, 4914, 2457, -7371, 0, 5103, -2187, 1, 8, 4, -112, -182, 728, 1456
Offset: 0

Views

Author

Paul D. Hanna, Jun 01 2003

Keywords

Examples

			Rows:
  1;
  1, 1, -3;
  1, 2, -5,  -6,   9;
  1, 3, -6, -17,  18,  27, -27;
  1, 4, -6, -32,  19,  96, -54,  -108,   81;
  1, 5, -5, -50,   5, 211, -15,  -450,  135,  405, -243;
  1, 6, -3, -70, -30, 366, 181, -1098, -270, 1890, -243, -1458, 729;
		

Crossrefs

Programs

  • Magma
    A084614:= func< n,k | (&+[Binomial(n, k-j)*Binomial(k-j, j)*(-3)^j: j in [0..k]]) >;
    [A084614(n,k): k in [0..2*n], n in [0..15]]; // G. C. Greubel, Mar 25 2023
    
  • Mathematica
    With[{eq= (1+x-3*x^2)}, Flatten[Table[CoefficientList[Expand[eq^n], x], {n,0,13}]]] (* G. C. Greubel, Mar 02 2017 *)
  • PARI
    for(n=0,12, for(k=0,2*n,t=polcoeff((1+x-3*x^2)^n,k,x); print1(t",")); print(" "))
    
  • SageMath
    def A084614(n,k): return ( (1+x-3*x^2)^n ).series(x, 30).list()[k]
    flatten([[A084614(n,k) for k in range(2*n+1)] for n in range(13)]) # G. C. Greubel, Mar 25 2023

Formula

From G. C. Greubel, Mar 25 2023: (Start)
T(n, k) = Sum_{j=0..k} binomial(n, k-j)*binomial(k-j, j)*(-3)^j, for 0 <= k <= 2*n.
T(n, 2*n) = (-3)^n.
T(n, 2*n-1) = (-1)^(n-1)*A027471(n+1), n >= 1.
Sum_{k=0..2*n} T(n, k) = (-1)^n.
Sum_{k=0..2*n} (-1)^k*T(n, k) = (-3)^n. (End)

A084612 Triangle, read by rows, where the n-th row lists the (2n+1) coefficients of (1 + x - 2*x^2)^n.

Original entry on oeis.org

1, 1, 1, -2, 1, 2, -3, -4, 4, 1, 3, -3, -11, 6, 12, -8, 1, 4, -2, -20, 1, 40, -8, -32, 16, 1, 5, 0, -30, -15, 81, 30, -120, 0, 80, -32, 1, 6, 3, -40, -45, 126, 141, -252, -180, 320, 48, -192, 64, 1, 7, 7, -49, -91, 161, 357, -363, -714, 644, 728, -784, -224, 448, -128, 1, 8, 12, -56, -154, 168, 700, -328, -1791, 656, 2800
Offset: 0

Views

Author

Paul D. Hanna, Jun 01 2003

Keywords

Examples

			Triangle begins:
  1;
  1, 1, -2;
  1, 2, -3,  -4,   4;
  1, 3, -3, -11,   6,  12,  -8;
  1, 4, -2, -20,   1,  40,  -8,  -32,   16;
  1, 5,  0, -30, -15,  81,  30, -120,    0,  80, -32;
  1, 6,  3, -40, -45, 126, 141, -252, -180, 320,  48, -192, 64;
		

Crossrefs

Programs

  • Magma
    A084612:= func< n,k | (&+[Binomial(n, k-j)*Binomial(k-j, j)*(-2)^j: j in [0..k]]) >;
    [A084612(n,k): k in [0..2*n], n in [0..13]]; // G. C. Greubel, Mar 25 2023
    
  • Mathematica
    T[n_, k_]:= Sum[Binomial[n,k-j]*Binomial[k-j,j]*(-2)^j, {j,0,k}];
    Table[T[n, k], {n,0,12}, {k,0,2*n}]//Flatten (* G. C. Greubel, Mar 25 2023 *)
  • PARI
    {T(n,k)=polcoeff((1+x-2*x^2)^n, k)}
    for(n=0,10,for(k=0,2*n,print1(T(n,k),", "));print(""))
    
  • SageMath
    def A084612(n,k): return sum(binomial(n,k-j)*binomial(k-j,j)*(-2)^j for j in range(k+1))
    flatten([[A084612(n,k) for k in range(2*n+1)] for n in range(13)]) # G. C. Greubel, Mar 25 2023

Formula

From G. C. Greubel, Mar 25 2023: (Start)
T(n, k) = Sum_{j=0..k} binomial(n,k-j)*binomial(k-j,j)*(-2)^j, for 0 <= k <= 2*n.
T(n, 2*n) = (-2)^n.
T(n, 2*n-1) = (-1)^(n-1)*A001787(n), n >= 1.
Sum_{k=0..2*n} T(n, k) = A000007(n).
Sum_{k=0..2*n} (-1)^k*T(n, k) = (-2)^n. (End)

A192205 a(n) = sum of absolute values of coefficients in (1-x-x^2+x^3)^n.

Original entry on oeis.org

1, 4, 12, 36, 116, 344, 1104, 3280, 10456, 31152, 98804, 295988, 935876, 2811540, 8870324, 26695724, 84060148, 253376840, 796635360, 2404558304, 7549431884, 22820942416, 71541295984, 216562743948, 677938097756, 2054922521644
Offset: 0

Views

Author

Paul D. Hanna, Jun 25 2011

Keywords

Comments

Conjecture: limit a(n)^(1/n) = 16*sqrt(3)/9 = 3.079201..., which is substantiated by the observation that the sums of the coefficients squared in (1-x-x^2+x^3)^n equals binomial(4n,n) (cf. A005810).

Examples

			The triangle A227964 of coefficients in (1+x-x^2-x^3)^n begins:
n=0: [1];
n=1: [1, -1, -1, 1];
n=2: [1, -2, -1, 4, -1, -2, 1];
n=3: [1, -3, 0, 8, -6, -6, 8, 0, -3, 1];
n=4: [1, -4, 2, 12, -17, -8, 28, -8, -17, 12, 2, -4, 1];
n=5: [1, -5, 5, 15, -35, -1, 65, -45, -45, 65, -1, -35, 15, 5, -5, 1];
n=6: [1, -6, 9, 16, -60, 24, 116, -144, -66, 220, -66, -144, 116, 24, -60, 16, 9, -6, 1]; ...
This sequence gives the sums of the absolute values of the coefficients for n>=0.
		

Crossrefs

Programs

  • Mathematica
    Table[Total[Abs[CoefficientList[Expand[(1-x-x^2+x^3)^n],x]]],{n,0,30}] (* Harvey P. Dale, Mar 03 2013 *)
  • PARI
    {a(n)=sum(k=0,3*n,abs(polcoeff((1-x-x^2+x^3)^n,k)))}
    for(n=0,30,print1(a(n),", "))

A192210 a(n) = sum of unsigned coefficients in (1+x+x^2-x^3)^n.

Original entry on oeis.org

1, 4, 10, 26, 80, 194, 504, 1442, 3710, 9536, 26842, 69014, 178704, 496602, 1316204, 3377206, 9242898, 24629944, 63304540, 172497622, 462822414, 1210912388, 3177522724, 8736822276, 22617998204, 59776061150, 163702751968, 433787373560
Offset: 0

Views

Author

Paul D. Hanna, Jun 25 2011

Keywords

Comments

What is the behavior of this sequence? Does there exist a g.f.?
It would be nice to know the (more accurate) values of the following limits:
(1) The position of the first negative coefficient in (1+x+x^2-x^3)^n, divided by n, seems to reach a limit near 0.398...
(2) Limit a(n)^(1/n) seems to exist near 2.6637...
(3) Limit a(n+1)/a(n) does not seem to be unique; attractors seem to exist near 2.66...

Examples

			Illustrate the coefficients in (1+x+x^2-x^3)^n by:
n=0: [1];
n=1: [1, 1, 1, -1];
n=2: [1, 2, 3, 0, -1, -2, 1];
n=3: [1, 3, 6, 4, 0, -6, -2, 0, 3, -1];
n=4: [1, 4, 10, 12, 7, -8, -12, -8, 7, 4, 2, -4, 1];
n=5: [1, 5, 15, 25, 25, 1, -25, -35, -5, 15, 21, -5, -5, -5, 5, -1];
n=6: [1, 6, 21, 44, 60, 36, -24, -84, -66, 0, 66, 36, -4, -36, 0, 4, 9, -6, 1];
n=7: [1, 7, 28, 70, 119, 119, 28, -132, -210, -126, 84, 168, 98, -70, -76, -28, 49, 7, 0, -14, 7, -1]; ...
This sequence gives the sums of the absolute values of the coefficients for n>=0.
		

Crossrefs

Programs

  • Mathematica
    Table[Total[Abs[CoefficientList[Expand[(1+x+x^2-x^3)^n],x]]],{n,0,30}] (* Harvey P. Dale, Oct 12 2012 *)
  • PARI
    {a(n)=sum(k=0,3*n,abs(polcoeff((1+x+x^2-x^3)^n,k)))}
Showing 1-4 of 4 results.