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.

A361292 Square array A(n, k), n, k >= 0, read by antidiagonals; A(0, 0) = 1, and otherwise A(n, k) is the sum of all terms in previous antidiagonals at one knight's move away.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 2, 2, 0, 1, 0, 2, 4, 2, 4, 2, 0, 2, 5, 4, 7, 7, 4, 5, 2, 5, 5, 10, 14, 12, 14, 10, 5, 5, 5, 10, 21, 23, 30, 30, 23, 21, 10, 5, 10, 23, 35, 49, 62, 60, 62, 49, 35, 23, 10, 23, 40, 69, 100, 119, 137, 137, 119, 100, 69, 40, 23
Offset: 0

Views

Author

Rémy Sigrist, Mar 12 2023

Keywords

Examples

			Square array A(n, k) begins:
  n\k |  0   1    2    3     4     5     6      7      8      9      10
  ----+----------------------------------------------------------------
    0 |  1   0    0    0     1     1     0      2      5      5      10
    1 |  0   0    1    1     0     2     5      5     10     23      40
    2 |  0   1    0    2     4     4    10     21     35     69     138
    3 |  0   1    2    2     7    14    23     49    100    190     382
    4 |  1   0    4    7    12    30    62    119    250    512    1031
    5 |  1   2    4   14    30    60   137    290    599   1263    2639
    6 |  0   5   10   23    62   137   298    662   1430   3043    6502
    7 |  2   5   21   49   119   290   662   1472   3281   7181   15569
    8 |  5  10   35  100   250   599  1430   3281   7410  16585   36699
    9 |  5  23   69  190   512  1263  3043   7181  16585  37700   84939
   10 | 10  40  138  382  1031  2639  6502  15569  36699  84939  194154
		

Crossrefs

See A355320 for a similar sequence.

Programs

  • Mathematica
    A361292list[dmax_]:=Module[{A},A[0,0]=1;A[n_,k_]:=A[n,k]=A[k,n]=If[n>=0&&k>=0,A[n-2,k-1]+A[n-2,k+1]+A[n-1,k-2]+A[n+1,k-2],0];Table[A[n-k,k],{n,0,dmax-1},{k,0,n}]];A361292list[15] (* Generates 15 antidiagonals *) (* Paolo Xausa, Oct 17 2023 *)
  • PARI
    See Links section.

Formula

A(n, k) = A(k, n).
A(n, k) = A'(n-2, k-1) + A'(n-2, k+1) + A'(n-1, k-2) + A'(n+1, k-2) for n + k > 0 (where A' extends A with 0's outside its domain of definition).