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.

A062103 Number of paths by which an unpromoted knight (keima) of Shogi can move to various squares on infinite board, if it starts from its origin square, the second leftmost square of the back rank.

This page as a plain text file.
%I A062103 #6 Mar 06 2016 03:23:32
%S A062103 0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,1,0,
%T A062103 0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,1,0,0,0,5,0,0,
%U A062103 0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,1,0,0,0,14
%N A062103 Number of paths by which an unpromoted knight (keima) of Shogi can move to various squares on infinite board, if it starts from its origin square, the second leftmost square of the back rank.
%C A062103 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.
%H A062103 Hans L. Bodlaender, <a href="http://www.chessvariants.com/index.html">The Chess Variant Pages</a>
%H A062103 Fairbairn, Leggett et al., <a href="http://www.iki.fi/~kartturi/shogi/shoogi.htm">Information about Shogi (Japanese chess)</a>
%p A062103 [seq(ShoogiKnightSeq(j),j=1..120)]; ShoogiKnightSeq := n -> ShoogiKnightTriangle(trinv(n-1)-1,(n-((trinv(n-1)*(trinv(n-1)-1))/2))-1);
%p A062103 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;
%t A062103 trinv[n_] := Floor[(1 + Sqrt[8 n + 1])/2];
%t A062103 ShoogiKnightSeq[n_] := ShoogiKnightTriangle[trinv[n - 1] - 1, (n - ((trinv[n - 1]*(trinv[n - 1] - 1))/2)) - 1];
%t A062103 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]];
%t A062103 Array[ShoogiKnightSeq, 120] (* _Jean-François Alcover_, Mar 06 2016, adapted from Maple *)
%Y A062103 A009766, A049604, A062104, trinv given at A054425.
%K A062103 nonn,tabl
%O A062103 1,20
%A A062103 _Antti Karttunen_, May 30 2001