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.

A225434 Apply the triangle-to-triangle transformation described in the Comments in A159041 to the triangle in A142459.

Original entry on oeis.org

1, 1, 1, 1, -58, 1, 1, -307, -307, 1, 1, -1556, 12006, -1556, 1, 1, -7805, 140722, 140722, -7805, 1, 1, -39054, 1461615, -5647300, 1461615, -39054, 1, 1, -195303, 14287093, -109642851, -109642851, 14287093, -195303, 1, 1, -976552, 135028828, -1838120344, 4873361350, -1838120344, 135028828, -976552, 1
Offset: 0

Views

Author

Roger L. Bagula, May 07 2013

Keywords

Examples

			The triangle begins:
  1;
  1,       1;
  1,     -58,        1;
  1,    -307,     -307,          1;
  1,   -1556,    12006,      -1556,          1;
  1,   -7805,   140722,     140722,      -7805,        1;
  1,  -39054,  1461615,   -5647300,    1461615,   -39054,       1;
  1, -195303, 14287093, -109642851, -109642851, 14287093, -195303, 1;
		

Crossrefs

Programs

  • Maple
    See A159041.
  • Mathematica
    (* First program *)
    t[n_, k_, m_]:= t[n, k, m]= If[k==0 || k==n, 1, (m*(n+1)-m*(k+1)+1)*t[n-1,k-1,m] + (m*(k+1)-(m-1))*t[n-1,k,m] ]; (* t(n,k,4)=A142459 *)
    p[x_, n_]:= p[x, n]= Sum[x^i*If[i==Floor[n/2] && Mod[n, 2]==0, 0, If[i<=Floor[n/2], (-1)^i*t[n,i,4], (-1)^(n-i+1)*t[n,i,4]]], {i,0,n}]/(1-x);
    Flatten[Table[CoefficientList[p[x, n], x], {n,0,12}]]
    (* Second program *)
    t[n_, k_, m_]:= t[n, k, m]= If[k==1 || k==n, 1, (m*(n+1)-m*(k+1)+1)*t[n-1,k-1,m] + (m*(k+1)-(m-1))*t[n-1,k,m]];
    T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, If[k<=Floor[n/2], T[n, k-1] + (-1)^k*t[n+2,k+1,4], T[n, n-k]]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Mar 19 2022 *)
  • Sage
    @CachedFunction
    def T(n, k, m):
        if (k==1 or k==n): return 1
        else: return (m*(n-k)+1)*T(n-1, k-1, m) + (m*k-m+1)*T(n-1, k, m)
    def A142459(n,k): return T(n,k,4)
    @CachedFunction
    def A225434(n,k):
        if (k==0 or k==n): return 1
        elif (k <= (n//2)): return A225434(n,k-1) + (-1)^k*A142459(n+2,k+1)
        else: return A225434(n,n-k)
    flatten([[A225434(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 19 2022

Formula

A triangle of polynomial coefficients: p(x,n) = Sum_{i=0..n} ( x^i * if(i = floor(n/2) and (n mod 2) = 0, 0, if(i <= floor(n/2), (-1)^i*A142459(n+1, i+1), (-1)^(n-i+1)*A142459(n+1, i+1) ) )/(1-x).
T(n, k) = T(n,k-1) + (-1)^k*A142459(n+2,k+1) if k <= floor(n/2), otherwise T(n, n-k), with T(n, 0) = T(n, n) = 1. - G. C. Greubel, Mar 19 2022

Extensions

Edited by N. J. A. Sloane, May 11 2013