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.

A355320 Irregular triangle T(n, k), n >= 0, -2*n <= k <= 2*n, read by rows; T(0, 0) = 1; for n > 0, T(n, k) is the sum of all terms in previous rows at one knight's move away.

Original entry on oeis.org

1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 2, 1, 0, 0, 1, 1, 0, 0, 2, 3, 2, 0, 2, 3, 2, 0, 0, 1, 1, 0, 0, 3, 4, 3, 1, 6, 8, 6, 1, 3, 4, 3, 0, 0, 1, 1, 0, 0, 4, 5, 4, 3, 12, 16, 12, 6, 12, 16, 12, 3, 4, 5, 4, 0, 0, 1, 1, 0, 0, 5, 6, 5, 6, 20, 27, 21, 18, 33, 44, 33, 18, 21, 27, 20, 6, 5, 6, 5, 0, 0, 1
Offset: 0

Views

Author

Rémy Sigrist, Jun 28 2022

Keywords

Comments

See A096608 for the right half of the triangle.
Odd terms form fractal patterns (see illustrations in Links section).

Examples

			Triangle T(n, k) begins:
                                 1
                           1  0  0  0  1
                     1  0  0  1  2  1  0  0  1
               1  0  0  2  3  2  0  2  3  2  0  0  1
         1  0  0  3  4  3  1  6  8  6  1  3  4  3  0  0  1
   1  0  0  4  5  4  3 12 16 12  6 12 16 12  3  4  5  4  0  0  1
		

Crossrefs

Programs

  • Mathematica
    A355320[rowmax_]:=Module[{T},T[0,0]=1;T[n_,k_]:=T[n,k]=If[k<=2n,T[n-1,Abs[k-2]]+T[n-2,Abs[k-1]]+T[n-1,k+2]+T[n-2,k+1],0];Table[T[n,Abs[k]],{n,0,rowmax},{k,-2n,2n}]]; A355320[10] (* Generates 11 rows *) (* Paolo Xausa, May 09 2023 *)
  • PARI
    row(n) = { my (rr=0, r=1); for (k=1, n, [rr,r]=[r,r*(1+'X^4)+rr*('X^3+'X^5)]); Vec(r) }

Formula

T(n, k) = A096608(n, abs(k)).
T(n, 0) = A096609(n).
T(n, 1) = A096610(n).
T(n, 2) = A096611(n).
T(n, n) = A096612(n).
T(n, 2*n) = 1.
T(n, 2*n-1) = T(n, 2*n-2) = 0 for any n > 0.
T(n, k) = T'(n-1, k-2) + T'(n-1, k+2) + T'(n-2, k-1) + T'(n-2, k+1) for n > 0 (where T' extends T with 0's outside its domain of definition).
T(n, -k) = T(n, k).
Sum_{k = -2*n..2*n} T(n, k) = A002605(n+1).