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.

A147563 Irregular triangle, T(n, k) = [x^k] p(n, x), where p(n, x) = 4*Sum_{j=0..n} A008292(n+1, j) * (x/2)^j * (1-x/2)^(n-j), read by rows.

Original entry on oeis.org

4, 4, 4, 4, -2, 4, 16, -8, 4, 44, -6, -16, 4, 4, 104, 84, -136, 34, 4, 228, 606, -584, -24, 102, -17, 4, 480, 2832, -1088, -2208, 1488, -248, 4, 988, 11122, 5536, -20840, 8896, 832, -992, 124, 4, 2008, 39772, 74296, -118190, -2144, 51952, -22112, 2764
Offset: 0

Views

Author

Roger L. Bagula, Nov 07 2008

Keywords

Examples

			Irregular triangle begins as:
  4;
  4;
  4,    4,    -2;
  4,   16,    -8;
  4,   44,    -6,   -16,       4;
  4,  104,    84,  -136,      34;
  4,  228,   606,  -584,     -24,   102,   -17;
  4,  480,  2832, -1088,   -2208,  1488,  -248;
  4,  988, 11122,  5536,  -20840,  8896,   832,   -992,  124;
  4, 2008, 39772, 74296, -118190, -2144, 51952, -22112, 2764;
		

Crossrefs

Cf. A008292.

Programs

  • Magma
    A008292:= func< n,k | (&+[(-1)^j*Binomial(n+1, j)*(k-j)^n: j in [0..k]]) >;
    T:= func< n,k | (-1/2)^(k-2)*(&+[(-1)^j*Binomial(n-j,k-j)*A008292(n+1,j+1): j in [0..k]]) >;
    [Floor(T(n,k)): k in [0..2*Floor(n/2)], n in [0..16]]; // G. C. Greubel, Oct 27 2022; Mar 03 2023
    
  • Mathematica
    (* First program *)
    nmax:= 15;
    p[x_, n_]= (1-x)^(n+1)*PolyLog[-n, x]/x;
    b= Table[CoefficientList[p[x, n], x], {n, nmax+1}];
    F[n_]:= CoefficientList[4*Sum[b[[n+1]][[m+1]]*(x/2)^(n-m)*(1-x/2)^m, {m, 0, n}], x];
    T[n_]:= If[IntegerQ[F[n]], F[n], Sign[F[n]]*Abs[Round[F[n] - 1/2]]];
    Table[T[n], {n, 0, nmax}]//Flatten
    (* Second program *)
    A008292[n_, k_]:= Sum[(-1)^j*(k-j)^n*Binomial[n+1,j], {j,0,k}];
    F[n_, k_]:= (-1/2)^(k-2)*Sum[(-1)^j*Binomial[n-j, k-j]*A008292[n+1, j+ 1], {j,0,k}];
    T[n_, k_]:= If[IntegerQ[F[n,k]], F[n,k], Sign[F[n,k]]*Abs[Round[F[n, k] - 1/2]]];
    Table[T[n, k], {n,0,16}, {k, 0, 2*Floor[n/2]}]//Flatten (* G. C. Greubel, Mar 03 2023 *)
  • SageMath
    def A008292(n,k): return sum( (-1)^j*binomial(n+1, j)*(k-j)^n for j in range(k+1) )
    def A147563(n,k): return floor((-1/2)^(k-2)*sum((-1)^j*binomial(n-j, k-j)*A008292(n+1,j+1) for j in range(k+1)))
    flatten([[A147563(n,k) for k in range(2*floor(n/2) + 1)] for n in range(16)]) # G. C. Greubel, Oct 27 2022; Mar 03 2023

Formula

T(n, k) = coefficients [x^k]( p(n, x) ), where p(n, x) = 4*Sum_{j=0..n} A008292(n+1, j) * (x/2)^j * (1-x/2)^(n-j).
T(n, k) = round( (-1/2)^(k-2) * Sum_{j=0..k} (-1)^j*binomial(n-j, k-j) * A008292(n+1, j+1) ). - G. C. Greubel, Mar 03 2023

Extensions

Edited by G. C. Greubel, Oct 27 2022