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.

A156608 Triangle T(n, k, m) = round( t(n,m)/(t(k,m)*t(n-k,m)) ), with T(0, k, m) = 1, where t(n, k) = Product_{j=1..n} A129862(k+1, j), t(n, 0) = n!, and m = 2, read by rows.

Original entry on oeis.org

1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -2, 2, 2, -2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, -1, 2, 2, -1, 1, 1, 1, -2, 2, 2, -4, 2, 2, -2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, -1, 2, 2, -1, 2, 2, -1, 1, 1
Offset: 0

Views

Author

Roger L. Bagula, Feb 11 2009

Keywords

Comments

The original definition of this sequence said it was based on the Cartan matrix of type D_n, so that matrix is somehow implicitly involved. - N. J. A. Sloane, Jun 25 2021

Examples

			Triangle begins:
  1;
  1,  1;
  1, -1,  1;
  1,  1,  1, 1;
  1,  1, -1, 1,  1;
  1, -2,  2, 2, -2,  1;
  1,  1,  2, 2,  2,  1, 1;
  1,  1, -1, 2,  2, -1, 1,  1;
  1, -2,  2, 2, -4,  2, 2, -2,  1;
  1,  1,  2, 2,  2,  2, 2,  2,  1, 1;
  1,  1, -1, 2,  2, -1, 2,  2, -1, 1, 1;
		

Crossrefs

Cf. A129862, A007318 (m=0), this sequence (m=2), A156609 (m=3), A156610 (m=4), A156612.

Programs

  • Mathematica
    (* First program *)
    b[n_, k_, d_]:= If[n==k, 2, If[(k==d && n==d-2) || (n==d && k==d-2), -1, If[(k==n- 1 || k==n+1) && n<=d-1 && k<=d-1, -1, 0]]];
    M[d_]:= Table[b[n, k, d], {n, d}, {k, d}];
    p[x_, n_]:= If[n==0, 1, CharacteristicPolynomial[M[n], x]];
    f = Table[p[x, n], {n, 0, 20}];
    t[n_, k_]:= If[k==0, n!, Product[f[[j+1]], {j, n-1}]]/.x -> k+1;
    T[n_, k_, m_]:= Round[t[n, m]/(t[k, m]*t[n-k, m])];
    Table[T[n, k, 2], {n,0,15}, {k, 0, n}]//Flatten (* modified by G. C. Greubel, Jun 23 2021 *)
    (* Second program *)
    f[n_, x_]:= f[n,x]= If[n<2, (2-x)^n, (2-x)*LucasL[2*(n-1), Sqrt[-x]] ];
    t[n_, k_]:= t[n,k]= If[k==0, n!, Product[f[j, x], {j, n-1}]]/.x -> (k+1);
    T[n_, k_, m_]:= T[n,k,m]= Round[t[n,m]/(t[k,m]*t[n-k,m])];
    Table[T[n, k, 2], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 23 2021 *)
  • Sage
    @CachedFunction
    def f(n,x): return (2-x)^n if (n<2) else 2*(2-x)*sum( ((n-1)/(2*n-j-2))*binomial(2*n-j-2, j)*(-x)^(n-j-1) for j in (0..n-1) )
    def g(n,k): return factorial(n) if (k==0) else product( f(j, k+1) for j in (1..n-1) )
    def T(n,k,m): return round( g(n,m)/(g(k,m)*g(n-k,m)) )
    flatten([[T(n,k,2) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Jun 23 2021

Formula

T(n, k, m) = round( t(n,m)/(t(k,m)*t(n-k,m)) ), with T(0, k, m) = 1, where t(n, k) = Product_{j=1..n} A129862(k+1, j), t(n, 0) = n!, and m = 2.

Extensions

Edited by G. C. Greubel, Jun 23 2021

A156609 Triangle T(n, k, m) = round( t(n,m)/(t(k,m)*t(n-k,m)) ), with T(0, k, m) = 1, where t(n, k) = Product_{j=1..n} A129862(k+1, j), t(n, 0) = n!, and m = 3, read by rows.

Original entry on oeis.org

1, 1, 1, 1, -2, 1, 1, 4, 4, 1, 1, -4, 8, -4, 1, 1, 4, 8, 8, 4, 1, 1, -4, 8, -8, 8, -4, 1, 1, 4, 8, 8, 8, 8, 4, 1, 1, -4, 8, -8, 8, -8, 8, -4, 1, 1, 4, 8, 8, 8, 8, 8, 8, 4, 1, 1, -4, 8, -8, 8, -8, 8, -8, 8, -4, 1
Offset: 0

Views

Author

Roger L. Bagula, Feb 11 2009

Keywords

Comments

Cartan_Dn refers to a Cartan matrix of type D_n. - N. J. A. Sloane, Jun 25 2021

Examples

			Triangle begins:
  1;
  1,  1;
  1, -2, 1;
  1,  4, 4,  1;
  1, -4, 8, -4, 1;
  1,  4, 8,  8, 4,  1;
  1, -4, 8, -8, 8, -4, 1;
  1,  4, 8,  8, 8,  8, 4,  1;
  1, -4, 8, -8, 8, -8, 8, -4, 1;
  1,  4, 8,  8, 8,  8, 8,  8, 4,  1;
  1, -4, 8, -8, 8, -8, 8, -8, 8, -4, 1;
		

Crossrefs

Cf. A129862, A007318 (m=0), A156608 (m=2), this sequence (m=3), A156610 (m=4), A156612.

Programs

  • Magma
    function T(n,k)
      if k eq 0 or k eq n then return 1;
      elif n eq 2 and k eq 1 then return -2;
      elif k eq 1 or k eq n-1 then return 4*(-1)^(n+1);
      elif k eq 2 or k eq n-2 then return 8;
      elif (n mod 2) eq 0 then return 8*(-1)^k;
      else return 8;
      end if; return T;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jun 24 2021
    
  • Mathematica
    (* First program *)
    b[n_, k_, d_]:= If[n==k, 2, If[(k==d && n==d-2) || (n==d && k==d-2), -1, If[(k==n- 1 || k==n+1) && n<=d-1 && k<=d-1, -1, 0]]];
    M[d_]:= Table[b[n, k, d], {n, d}, {k, d}];
    p[x_, n_]:= If[n==0, 1, CharacteristicPolynomial[M[n], x]];
    f = Table[p[x, n], {n, 0, 20}];
    t[n_, k_]:= If[k==0, n!, Product[f[[j+1]], {j, n-1}]]/.x -> k+1;
    T[n_, k_, m_]:= Round[t[n, m]/(t[k, m]*t[n-k, m])];
    Table[T[n, k, 3], {n,0,15}, {k, 0, n}]//Flatten (* modified by G. C. Greubel, Jun 23 2021 *)
    (* Second program *)
    f[n_, x_]:= f[n,x]= If[n<2, (2-x)^n, (2-x)*LucasL[2*(n-1), Sqrt[-x]] ];
    t[n_, k_]:= t[n,k]= If[k==0, n!, Product[f[j, x], {j, n-1}]]/.x -> (k+1);
    T[n_, k_, m_]:= T[n,k,m]= Round[t[n,m]/(t[k,m]*t[n-k,m])];
    Table[T[n, k, 3], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 23 2021 *)
  • Sage
    @CachedFunction
    def f(n,x): return (2-x)^n if (n<2) else 2*(2-x)*sum( ((n-1)/(2*n-j-2))*binomial(2*n-j-2, j)*(-x)^(n-j-1) for j in (0..n-1) )
    def g(n,k): return factorial(n) if (k==0) else product( f(j, k+1) for j in (1..n-1) )
    def T(n,k,m): return round( g(n,m)/(g(k,m)*g(n-k,m)) )
    flatten([[T(n,k,3) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Jun 23 2021

Formula

T(n, k, m) = round( t(n,m)/(t(k,m)*t(n-k,m)) ), with T(0, k, m) = 1, where t(n, k) = Product_{j=1..n} A129862(k+1, j), t(n, 0) = n!, and m = 3.
T(n, k) defined by T(n, 0) = T(n, n) = 1, T(2, 1) = -2, T(n, 1) = T(n, n-1) = 4*(-1)^(n+1), T(n, 2) = T(n, n-2) = 8, T(n, k) = 8*(-1)^k if n mod 2 = 0, and T(n, k) = 8 otherwise. - G. C. Greubel, Jun 24 2021

Extensions

Definition corrected and edited by G. C. Greubel, Jun 23 2021

A156610 Triangle T(n, k, m) = round( t(n,m)/(t(k,m)*t(n-k,m)) ), with T(0, k, m) = 1, where t(n, k) = Product_{j=1..n} A129862(k+1, j), t(n, 0) = n!, and m = 4, read by rows.

Original entry on oeis.org

1, 1, 1, 1, -3, 1, 1, 9, 9, 1, 1, -21, 63, -21, 1, 1, 54, 378, 378, 54, 1, 1, -141, 2538, -5922, 2538, -141, 1, 1, 369, 17343, 104058, 104058, 17343, 369, 1, 1, -966, 118818, -1861482, 4786668, -1861482, 118818, -966, 1, 1, 2529, 814338, 33387858, 224175618, 224175618, 33387858, 814338, 2529, 1
Offset: 0

Views

Author

Roger L. Bagula, Feb 11 2009

Keywords

Comments

Cartan_Dn refers to a Cartan matrix of type D_n. - N. J. A. Sloane, Jun 25 2021

Examples

			Triangle begins:
  1;
  1,    1;
  1,   -3,      1;
  1,    9,      9,        1;
  1,  -21,     63,      -21,         1;
  1,   54,    378,      378,        54,         1;
  1, -141,   2538,    -5922,      2538,      -141,        1;
  1,  369,  17343,   104058,    104058,     17343,      369,      1;
  1, -966, 118818, -1861482,   4786668,  -1861482,   118818,   -966,    1;
  1, 2529, 814338, 33387858, 224175618, 224175618, 33387858, 814338, 2529, 1;
		

Crossrefs

Cf. A129862, A007318 (m=0), A156608 (m=2), A156609 (m=3), this sequence (m=4), A156612.

Programs

  • Mathematica
    (* First program *)
    b[n_, k_, d_]:= If[n==k, 2, If[(k==d && n==d-2) || (n==d && k==d-2), -1, If[(k==n- 1 || k==n+1) && n<=d-1 && k<=d-1, -1, 0]]];
    M[d_]:= Table[b[n, k, d], {n, d}, {k, d}];
    p[x_, n_]:= If[n==0, 1, CharacteristicPolynomial[M[n], x]];
    f = Table[p[x, n], {n, 0, 20}];
    t[n_, k_]:= If[k==0, n!, Product[f[[j+1]], {j, n-1}]]/.x -> k+1;
    T[n_, k_, m_]:= Round[t[n, m]/(t[k, m]*t[n-k, m])];
    Table[T[n, k, 4], {n,0,15}, {k, 0, n}]//Flatten (* modified by G. C. Greubel, Jun 24 2021 *)
    (* Second program *)
    f[n_, x_]:= f[n,x]= If[n<2, (2-x)^n, (2-x)*LucasL[2*(n-1), Sqrt[-x]] ];
    t[n_, k_]:= t[n,k]= If[k==0, n!, Product[f[j, x], {j, n-1}]]/.x -> (k+1);
    T[n_, k_, m_]:= T[n,k,m]= Round[t[n,m]/(t[k,m]*t[n-k,m])];
    Table[T[n, k, 4], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 24 2021 *)
  • Sage
    @CachedFunction
    def f(n,x): return (2-x)^n if (n<2) else 2*(2-x)*sum( ((n-1)/(2*n-j-2))*binomial(2*n-j-2, j)*(-x)^(n-j-1) for j in (0..n-1) )
    def g(n,k): return factorial(n) if (k==0) else product( f(j, k+1) for j in (1..n-1) )
    def T(n,k,m): return round( g(n,m)/(g(k,m)*g(n-k,m)) )
    flatten([[T(n,k,4) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Jun 24 2021

Formula

T(n, k, m) = round( t(n,m)/(t(k,m)*t(n-k,m)) ), with T(0, k, m) = 1, where t(n, k) = Product_{j=1..n} A129862(k+1, j), t(n, 0) = n!, and m = 4.
T(n, 1) = T(n, n-1) = [n==1] - 3*A219233(n-2)*[n >= 2]. - G. C. Greubel, Jun 24 2021

Extensions

Definition corrected and edited by G. C. Greubel, Jun 24 2021

A156612 Square array T(n, k) = Product_{j=1..n} A129862(k+1, j) with T(n, 0) = n!, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 0, 6, 1, 1, -1, 0, 24, 1, 1, -2, -1, 0, 120, 1, 1, -3, -8, -1, 0, 720, 1, 1, -4, -27, 32, 2, 0, 5040, 1, 1, -5, -64, 567, 128, 2, 0, 40320, 1, 1, -6, -125, 3584, 30618, -512, 2, 0, 362880, 1, 1, -7, -216, 14375, 745472, -4317138, -2048, -4, 0, 3628800
Offset: 0

Views

Author

Roger L. Bagula, Feb 11 2009

Keywords

Comments

Cartan_Dn refers to a Cartan matrix of type D_n. - N. J. A. Sloane, Jun 25 2021

Examples

			Square array begins:
    1, 1,  1,   1,     1,      1 ...;
    1, 1,  1,   1,     1,      1 ...;
    2, 0, -1,  -2,    -3,     -4 ...;
    6, 0, -1,  -8,   -27,    -64 ...;
   24, 0, -1,  32,   567,   3584 ...;
  120, 0,  2, 128, 30618, 745472 ...;
Triangle begins as:
  1;
  1, 1;
  1, 1,  2;
  1, 1,  0,    6;
  1, 1, -1,    0,    24;
  1, 1, -2,   -1,     0,    120;
  1, 1, -3,   -8,    -1,      0,      720;
  1, 1, -4,  -27,    32,      2,        0,  5040;
  1, 1, -5,  -64,   567,    128,        2,     0, 40320;
  1, 1, -6, -125,  3584,  30618,     -512,     2,     0, 362880;
  1, 1, -7, -216, 14375, 745472, -4317138, -2048,    -4,      0, 3628800;
		

Crossrefs

Programs

  • Mathematica
    (* First program *)
    b[n_, k_, d_]:= If[n==k, 2, If[(k==d && n==d-2) || (n==d && k==d-2), -1, If[(k==n- 1 || k==n+1) && n<=d-1 && k<=d-1, -1, 0]]];
    M[d_]:= Table[b[n, k, d], {n, d}, {k, d}];
    p[x_, n_]:= If[n==0, 1, CharacteristicPolynomial[M[n], x]];
    f = Table[p[x, n], {n, 0, 30}];
    T[n_, k_]:= If[k==0, n!, Product[f[[j+1]], {j, n-1}]]/.x -> k+1;
    Table[T[k, n - k], {n,0,15}, {k,0,n}]//Flatten (* modified by G. C. Greubel, Jun 25 2021 *)
    (* Second program *)
    f[n_, x_]:= f[n, x]= If[n<2, (2-x)^n, (2-x)*LucasL[2*(n-1), Sqrt[-x]]];
    t[n_, k_]:= t[n, k]= If[k==0, n!, Product[f[j, x], {j, n-1}]]/.x -> (k+1);
    Table[t[k, n-k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 25 2021 *)
  • Sage
    @CachedFunction
    def f(n,x): return (2-x)^n if (n<2) else 2*(2-x)*sum( ((n-1)/(2*n-j-2))*binomial(2*n-j-2, j)*(-x)^(n-j-1) for j in (0..n-1) )
    def T(n,k): return factorial(n) if (k==0) else product( f(j, k+1) for j in (1..n-1) )
    flatten([[T(k,n-k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Jun 25 2021

Formula

T(n, k) = Product_{j=1..n} A129862(k+1, j) with T(n, 0) = n!.

Extensions

Edited by G. C. Greubel, Jun 25 2021

A135185 Triangle read by rows: E. F. Cornelius Jr. and Phill Schultz-based polynomials for the D_n Cartan Matrices in sequence A129862 that give a triangular sequence.

Original entry on oeis.org

1, 2, -4, 1, -4, 4, 2, -11, 19, -4, 12, -82, 142, -84, 4, 288, -2208, 4142, -2262, 422, -4, 34560, -277056, 566448, -327528, 49938, -2504, 4, 24883200, -202141440, 427397472, -267303264, 44330580, -1580666, 17368, -4, 125411328000, -1021977907200, 2179398320640, -1397599077312
Offset: 1

Views

Author

Roger L. Bagula, Feb 04 2008

Keywords

Comments

These polynomials are suggested by Corollary 2.4 in the E. F. Cornelius Jr. and Phill Schultz paper.
It appears that many other fundamental matrix sequences can be related to these Cornelius-Schultz polynomials by a similar treatment.
Here a factor of 4 was necessary to convert them all to integer form.

Examples

			{1},
{2, -4},
{1, -4, 4},
{2, -11, 19, -4},
{12, -82, 142, -84, 4},
{288, -2208, 4142, -2262, 422, -4},
{34560, -277056, 566448, -327528, 49938, -2504, 4},
{24883200, -202141440, 427397472, -267303264, 44330580, -1580666, 17368, -4},
		

Crossrefs

Cf. A129862.
Showing 1-5 of 5 results.