|
|
A062104
|
|
Square array read by antidiagonals: number of ways a black pawn (starting at any square on the second rank) can (theoretically) end at various squares on an infinite chessboard.
|
|
4
|
|
|
0, 0, 1, 0, 1, 2, 0, 1, 3, 6, 0, 1, 3, 9, 15, 0, 1, 3, 10, 25, 40, 0, 1, 3, 10, 29, 69, 109, 0, 1, 3, 10, 30, 84, 193, 302, 0, 1, 3, 10, 30, 89, 242, 544, 846, 0, 1, 3, 10, 30, 90, 263, 698, 1544, 2390, 0, 1, 3, 10, 30, 90, 269, 774, 2016, 4406, 6796, 0, 1, 3, 10, 30, 90, 270
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,6
|
|
COMMENTS
|
Table formatted as a square array shows the top-left corner of the infinite board.
|
|
LINKS
|
|
|
EXAMPLE
|
Array begins:
0 0 0 0 0 0 0 0 0 0 0 0 ...
1 1 1 1 1 1 1 1 1 1 1 ...
2 3 3 3 3 3 3 3 3 3 ...
6 9 10 10 10 10 10 10 10 ...
15 25 29 30 30 30 30 30 ...
40 69 84 89 90 90 90 ...
109 193 242 263 269 270 ...
302 544 698 774 ...
846 1544 2016 ...
2390 4406 ...
6796 ...
|
|
MAPLE
|
[seq(CPTSeq(j), j=0..91)]; CPTSeq := n -> ChessPawnTriangle( (1+(n-((trinv(n)*(trinv(n)-1))/2))), ((((trinv(n)-1)*(((1/2)*trinv(n))+1))-n)+1) );
ChessPawnTriangle := proc(r, c) option remember; if(r < 2) then RETURN(0); fi; if(c < 1) then RETURN(0); fi; if(2 = r) then RETURN(1); fi; if(4 = r) then RETURN(1+ChessPawnTriangle(r-1, c-1)+ChessPawnTriangle(r-1, c)+ChessPawnTriangle(r-1, c+1));
else RETURN(ChessPawnTriangle(r-1, c-1)+ChessPawnTriangle(r-1, c)+ChessPawnTriangle(r-1, c+1)); fi; end;
|
|
MATHEMATICA
|
trinv[n_] := Floor[(1 + Sqrt[8 n + 1])/2];
CPTSeq[n_] := ChessPawnTriangle[(1 + (n - ((trinv[n]*(trinv[n] - 1))/2))), ((((trinv[n] - 1)*(((1/2)*trinv[n]) + 1)) - n) + 1)];
ChessPawnTriangle[r_, c_] := ChessPawnTriangle[r, c] = Which[r < 2, 0, c < 1, 0, 2 == r, 1, 4 == r, 1 + ChessPawnTriangle[r - 1, c - 1] + ChessPawnTriangle[r - 1, c] + ChessPawnTriangle[r - 1, c + 1], True, ChessPawnTriangle[r - 1, c - 1] + ChessPawnTriangle[r - 1, c] + ChessPawnTriangle[r - 1, c + 1]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|