OFFSET
1,20
COMMENTS
Table formatted as a square array shows the top-left corner of the infinite board. This is an aerated and sligthly skewed variant of Catalan's triangle A009766.
LINKS
Hans L. Bodlaender, The Chess Variant Pages
Fairbairn, Leggett et al., Information about Shogi (Japanese chess)
MAPLE
[seq(ShoogiKnightSeq(j), j=1..120)]; ShoogiKnightSeq := n -> ShoogiKnightTriangle(trinv(n-1)-1, (n-((trinv(n-1)*(trinv(n-1)-1))/2))-1);
ShoogiKnightTriangle := proc(r, m) option remember; if(m < 0) then RETURN(0); fi; if(r < 0) then RETURN(0); fi; if(m > r) then RETURN(0); fi; if((1 = r) and (0 = m)) then RETURN(1); fi; RETURN(ShoogiKnightTriangle(r-3, m-2) + ShoogiKnightTriangle(r-1, m-2)); end;
MATHEMATICA
trinv[n_] := Floor[(1 + Sqrt[8 n + 1])/2];
ShoogiKnightSeq[n_] := ShoogiKnightTriangle[trinv[n - 1] - 1, (n - ((trinv[n - 1]*(trinv[n - 1] - 1))/2)) - 1];
ShoogiKnightTriangle[r_, m_] := ShoogiKnightTriangle[r, m] = Which[m < 0, 0, r < 0, 0, m > r, 0, r == 1 && m == 0, 1, True, ShoogiKnightTriangle[r - 3, m - 2] + ShoogiKnightTriangle[r - 1, m - 2]];
Array[ShoogiKnightSeq, 120] (* Jean-François Alcover, Mar 06 2016, adapted from Maple *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, May 30 2001
STATUS
approved