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.

A123971 Triangle T(n,k), read by rows, defined by T(n,k)=3*T(n-1,k)-T(n-1,k-1)-T(n-2,k), T(0,0)=1, T(1,0)=2, T(1,1)=-1, T(n,k)=0 if k<0 or if k>n.

Original entry on oeis.org

1, 2, -1, 5, -5, 1, 13, -19, 8, -1, 34, -65, 42, -11, 1, 89, -210, 183, -74, 14, -1, 233, -654, 717, -394, 115, -17, 1, 610, -1985, 2622, -1825, 725, -165, 20, -1, 1597, -5911, 9134, -7703, 3885, -1203, 224, -23, 1, 4181, -17345, 30691, -30418, 18633, -7329
Offset: 0

Views

Author

Gary W. Adamson and Roger L. Bagula, Oct 30 2006

Keywords

Comments

This entry is the result of merging two sequences, this one and a later submission by Philippe Deléham, Nov 29 2013 (with edits from Ralf Stephan, Dec 12 2013). Most of the present version is the work of Philippe Deléham, the only things remaining from the original entry are the sequence data and the Mathematica program. - N. J. A. Sloane, May 31 2014
Subtriangle of the triangle given by (0, 2, 1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, -2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.
Apart from signs, equals A126124.
Row sums = 1.
Sum_{k=0..n} T(n,k)*(-x)^k = A001519(n+1), A079935(n+1), A004253(n+1), A001653(n+1), A049685(n), A070997(n), A070998(n), A072256(n+1), A078922(n+1), A077417(n), A085260(n+1), A001570(n+1) for x=0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 respectively.

Examples

			Triangle begins:
  1
  2, -1
  5, -5, 1
  13, -19, 8, -1
  34, -65, 42, -11, 1
  89, -210, 183, -74, 14, -1
  233, -654, 717, -394, 115, -17, 1
Triangle (0, 2, 1/2, 1/2, 0, 0, ...) DELTA (1, -2, 0, 0, ...) begins:
  1
  0, 1
  0, 2, -1
  0, 5, -5, 1
  0, 13, -19, 8, -1
  0, 34, -65, 42, -11, 1
  0, 89, -210, 183, -74, 14, -1
  0, 233, -654, 717, -394, 115, -17, 1
		

Crossrefs

Programs

  • Mathematica
    Mathematica ( general k th center) Clear[M, T, d, a, x, k] k = 3 T[n_, m_, d_] := If[ n == m && n < d && m < d, k, If[n == m - 1 || n == m + 1, -1, If[n == m == d, k - 1, 0]]] M[d_] := Table[T[n, m, d], {n, 1, d}, {m, 1, d}] Table[M[d], {d, 1, 10}] Table[Det[M[d]], {d, 1, 10}] Table[Det[M[d] - x*IdentityMatrix[d]], {d, 1, 10}] a = Join[{M[1]}, Table[CoefficientList[ Det[M[d] - x*IdentityMatrix[d]], x], {d, 1, 10}]] Flatten[a] MatrixForm[a] Table[NSolve[Det[M[d] - x*IdentityMatrix[d]] == 0, x], {d, 1, 10}] Table[x /. NSolve[Det[M[d] - x*IdentityMatrix[d]] == 0, x][[d]], {d, 1, 10}]
  • PARI
    T(n,k)=polcoeff(polcoeff(Ser((1-x)/(1+(y-3)*x+x^2)),n,x),n-k,y) \\ Ralf Stephan, Dec 12 2013
    
  • Sage
    @CachedFunction
    def A123971(n,k): # With T(0,0) = 1!
        if n< 0: return 0
        if n==0: return 1 if k == 0 else 0
        h = 2*A123971(n-1,k) if n==1 else 3*A123971(n-1,k)
        return A123971(n-1,k-1) - A123971(n-2,k) - h
    for n in (0..9): [A123971(n,k) for k in (0..n)] # Peter Luschny, Nov 20 2012

Formula

T(n,k) = (-1)^n*A126124(n+1,k+1).
T(n,k) = (-1)^k*Sum_{m=k..n} binomial(m,k)*binomial(m+n,2*m). - Wadim Zudilin, Jan 11 2012
G.f.: (1-x)/(1+(y-3)*x+x^2).
T(n,0) = A001519(n+1) = A000045(2*n+1).
T(n+1,1) = -A001870(n).

Extensions

Edited by N. J. A. Sloane, May 31 2014