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 11-14 of 14 results.

A122765 Triangle read by rows: Let p(k, x) = x*p(k-1, x) - p(k-2, x). Then T(k,x) = dp(k,x)/dx.

Original entry on oeis.org

1, -1, 2, -2, -2, 3, 2, -6, -3, 4, 3, 6, -12, -4, 5, -3, 12, 12, -20, -5, 6, -4, -12, 30, 20, -30, -6, 7, 4, -20, -30, 60, 30, -42, -7, 8, 5, 20, -60, -60, 105, 42, -56, -8, 9, -5, 30, 60, -140, -105, 168, 56, -72, -9, 10
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 22 2006

Keywords

Comments

Based on the coefficients of derivatives of the polynomials in A130777.

Examples

			Triangle begins as:
   1;
  -1,   2;
  -2,  -2,   3;
   2,  -6,  -3,   4;
   3,   6, -12,  -4,   5;
  -3,  12,  12, -20,  -5,   6;
  -4, -12,  30,  20, -30,  -6,   7;
   4, -20, -30,  60,  30, -42,  -7,   8;
   5,  20, -60, -60, 105,  42, -56,  -8,  9;
		

Crossrefs

Programs

  • Magma
    A122765:= func< n,k | k*(-1)^Binomial(n-k+1, 2)*Binomial(Floor((n+k)/2), k) >;
    [A122765(n,k): k in [1..n], n in [1..14]]; // G. C. Greubel, Dec 30 2022
    
  • Mathematica
    (* First program *)
    p[0,x]=1; p[1,x]=x-1; p[k_,x_]:= p[k, x]= x*p[k-1,x] -p[k-2,x]; a = Table[Expand[p[n, x]], {n, 0, 10}]; Table[CoefficientList[D[a[[n]], x], x], {n, 2, 10}]//Flatten
    (* Second program *)
    T[n_, k_]:= k*(-1)^Binomial[n-k+1,2]*Binomial[Floor[(n+k)/2], k];
    Table[T[n, k], {n,14}, {k,n}]//Flatten (* G. C. Greubel, Dec 30 2022 *)
  • PARI
    tpol(n) = if (n<=0, 1, if (n==1, x-1, x*tpol(n-1) -tpol(n-2)));
    lista(nn) = {for(n=0, nn, pol = deriv(tpol(n)); for (k=0, poldegree(pol), print1(polcoeff(pol, k), ", ");););} \\ Michel Marcus, Feb 07 2014
    
  • SageMath
    def A122765(n, k): return k*(-1)^binomial(n-k+1, 2)*binomial(((n+k)//2), k)
    flatten( [[A122765(n,k) for k in range(1,n+1)] for n in range(1,15)] ) # G. C. Greubel, Dec 30 2022

Formula

From G. C. Greubel, Dec 30 2022: (Start)
T(n, k) = coefficient [x^k]( p(n, x) ), where p(n,x) = (2/(x^2-4))*((n+1)*chebyshev_T(n+1,x/2) -n*chebyshev_T(n,x/2) - (x/2)*(chebyshev_U(n,x/2) - chebyshev_U(n-1,x/2))).
T(n, k) = k*(-1)^binomial(n-k+1, 2)*binomial(floor((n+k)/2), k).
T(n, n) = n.
T(n, n-1) = -(n-1).
T(n, n-2) = -2*A000217(n-2).
T(n, n-3) = 2*A000217(n-3).
T(n, 1) = (-1)^binomial(n, 2)*floor((n+1)/2).
T(n, 2) = 2*(-1)^binomial(n-1, 2)*binomial(floor((n+2)/2), 2).
Sum_{k=1..n} T(n, k) = A076118(n).
Sum_{k=1..n} (-1)^k*T(n, k) = (-1)^(n-1)*A165202(n).
Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = [n=1] - [n=2].
Sum_{k=1..floor((n+1)/2)} (-1)^k*T(n-k+1, k) = (-1)^binomial(n+1, 2)*b(n), where b(n) = 4^floor(n/4)*A026741(n/2) if n is even and b(n) = 4^floor((n-1)/4)*A026741((n-1)/4) if n is odd. (End)

Extensions

Name corrected and more terms from Michel Marcus, Feb 07 2014

A192004 Alternating row sums of array A187360: minimal polynomial of 2*cos(Pi/n) evaluated for x=-1.

Original entry on oeis.org

1, -1, -2, -1, 1, -2, 1, -1, 1, 1, 1, -2, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -2, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Wolfdieter Lang, Jul 14 2011

Keywords

Comments

It seems that after a(1) = 1, -1's occur only at the positions 2^k (with k >= 1) and -2's only at positions 3*2^k (with k >= 0, A007283), with everything else being 1. It would be nice to know whether this is true. - Antti Karttunen, May 27 2017
From Wolfdieter Lang, May 29 2017: (Start)
The preceding conjecture can be checked by using for even n Theorem 1A, eq. (41), and for odd n Theorem 2A, eq. (50) of the W. Lang arXiv link given in A187360 putting x = -1.
One uses for the polynomials that (A127672) and q (A130777) appearing there the result that(n, -1) = A099837(n+3), i.e., = 2 if n == 0 (mod 3), = -1 if n == 1 or 2 (mod 3), and q(n, -1) = A061347(n+2), i.e., = 1 if n == 0 or 2 (mod 3) and = -2 if n == 1 (mod 3).
E.g., n = 2^k, k >= 1: C(2^k, -1) = that(2^(k-1), -1) = -1 because 2^(k-1) == 1 or 2 (mod 3).
n = 3*2^k, k >= 1: C(2^k*3) = that(2^(k-1)*3, -1) / that(2^(k-1), -1) = 2/(-1) = -2 because 2^(k-1)*3 == 0 (mod 3), and the previous congruence. C(3, -1) = -2 also, by theorem 2A, see the next example.
n = 3^k, k >= 1: C(3^k, -1) = q((3^k-1)/2, -1) / q((3^(k-1)-1)/2, -1) = (-2)/1 = -2 if k = 1, and = (-2)/(-2) = +1 if k >= 2. (End)

Crossrefs

Formula

a(n) = Sum_{m=0..A055034(n)} (-1)^m*A187360(n,m), n >= 1.
a(n) = C(n,x=-1), with the minimal (monic and integer) polynomial C(n,x) of 2*cos(Pi/n).

A122766 Triangle read by rows: let p(n, x) = x*p(n-1, x) - p(n-2, x), then T(n, x) = d^2/dx^2 (p(n, x)).

Original entry on oeis.org

2, -2, 6, -6, -6, 12, 6, -24, -12, 20, 12, 24, -60, -20, 30, -12, 60, 60, -120, -30, 42, -20, -60, 180, 120, -210, -42, 56, 20, -120, -180, 420, 210, -336, -56, 72, 30, 120, -420, -420, 840, 336, -504, -72, 90, -30, 210, 420, -1120, -840, 1512, 504, -720, -90, 110
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 22 2006

Keywords

Examples

			Triangle begins as:
    2;
   -2,    6;
   -6,    6,   12;
    6,  -24,  -12,   20;
   12,   24,  -60,  -20,   30;
   12,   60,   60, -120,  -30,   42;
  -20,  -60,  180,  120, -210,  -42,  56;
   20, -120, -180,  420,  210, -336, -56,  72;
		

Crossrefs

Programs

  • Magma
    A122766:= func< n,k | 2*(-1)^Binomial(n-k+1, 2)*Binomial(k+1,2)*Binomial(Floor((n+k+2)/2), k+1) >;
    [A122766(n,k): k in [1..n], n in [1..14]]; // G. C. Greubel, Dec 31 2022
    
  • Mathematica
    (* First program *)
    p[0, x]=1; p[1, x]=x-1; p[k_, x_]:= p[k, x]= x*p[k-1, x] -p[k-2, x]; b = Table[Expand[p[n,x]], {n,0,15}]; Table[CoefficientList[D[b[[n]], {x,2}], x], {n,2,14}]//Flatten
    (* Second program *)
    T[n_, k_]:= 2*(-1)^Binomial[n-k+1,2]*Binomial[k+1,2]*Binomial[Floor[(n +k+2)/2], k+1]; Table[T[n,k], {n,14}, {k,n}]//Flatten (* G. C. Greubel, Dec 31 2022 *)
  • PARI
    tpol(n) = if (n <= 0, 1, if (n == 1, x -1, x*tpol(n-1) - tpol(n-2)));
    lista(nn) = {for(n=0, nn, pol = deriv(deriv(tpol(n))); for (k=0, poldegree(pol), print1(polcoeff(pol, k), ", ");););} \\ Michel Marcus, Feb 07 2014
    
  • SageMath
    def A122766(n, k): return 2*(-1)^binomial(n-k+1,2)*binomial(k+1,2)*binomial(((n+k+2)//2), k+1)
    flatten([[A122766(n, k) for k in range(1, n+1)] for n in range(1, 15)]) # G. C. Greubel, Dec 31 2022

Formula

From G. C. Greubel, Dec 31 2022: (Start)
T(n, k) = 2*(-1)^binomial(n-k+1, 2)*binomial(k+1,2)*binomial(floor((n+k +2)/2), k+1).
T(n, 1) = 2*(-1)^binomial(n,2)*binomial(floor((n+3)/2), 2)
T(n, n) = 2*A000217(n).
Sum_{k=1..n} T(n, k) = 2*A104555(n).
Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = 2*([n=1] - [n=2]). (End)

Extensions

Edited by N. J. A. Sloane, Oct 01 2006
Name corrected and more terms from Michel Marcus, Feb 07 2014

A136745 Irregular triangle T(0,0)=1, T(1,0)=-1, T(1,1)=0, T(1,2)=1 and T(n,k) = T(n-1,k-2)-T(n-2,k).

Original entry on oeis.org

1, -1, 0, 1, -1, 0, -1, 0, 1, 1, 0, -2, 0, -1, 0, 1, 1, 0, 2, 0, -3, 0, -1, 0, 1, -1, 0, 3, 0, 3, 0, -4, 0, -1, 0, 1, -1, 0, -3, 0, 6, 0, 4, 0, -5, 0, -1, 0, 1, 1, 0, -4, 0, -6, 0, 10, 0, 5, 0, -6, 0, -1, 0, 1, 1, 0, 4, 0, -10, 0, -10, 0, 15, 0, 6, 0, -7, 0, -1, 0, 1, -1, 0, 5, 0, 10, 0, -20, 0, -15, 0, 21, 0, 7, 0, -8, 0, -1, 0, 1, -1, 0, -5, 0, 15, 0, 20, 0
Offset: 0

Views

Author

Roger L. Bagula, Mar 19 2008

Keywords

Comments

Row sums are probably a repeating sequence 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0,...
This is simply A130777 with columns of zeros inserted in odd-numbered columns. - R. J. Mathar, Nov 04 2011

Examples

			1;
-1, 0, 1;
-1, 0, -1, 0, 1;
1, 0, -2, 0, -1, 0, 1;
1, 0, 2, 0, -3, 0, -1, 0, 1;
-1, 0, 3, 0, 3, 0, -4, 0, -1, 0, 1;
-1, 0, -3, 0, 6, 0, 4, 0, -5, 0, -1, 0, 1;
1, 0, -4, 0, -6, 0, 10, 0, 5, 0, -6, 0, -1, 0,1;
1, 0, 4,0, -10, 0, -10, 0, 15, 0, 6, 0, -7, 0, -1, 0, 1;
-1, 0, 5, 0, 10, 0, -20, 0, -15, 0, 21, 0, 7, 0, -8, 0, -1, 0, 1;
-1, 0, -5, 0, 15, 0,20, 0, -35, 0, -21, 0, 28, 0, 8, 0, -9, 0, -1, 0, 1;
		

Crossrefs

Cf. A130777.

Programs

  • Mathematica
    Clear[p, x, n] p[x, 0] = 1; p[x, 1] = x^2 - 1; p[x_, n_] := p[x, n] = x^2*p[x, n - 1] - p[x, n - 2]; Table[ExpandAll[p[x, n]], {n, 0, 10}]; a = Table[CoefficientList[p[x, n], x], {n, 0, 10}]; Flatten[a] Table[Apply[Plus, CoefficientList[p[x, n], x]], {n, 0, 10}];
Previous Showing 11-14 of 14 results.