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.

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.

This page as a plain text file.
%I A062104 #22 Mar 06 2016 03:24:00
%S A062104 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,
%T A062104 3,10,30,84,193,302,0,1,3,10,30,89,242,544,846,0,1,3,10,30,90,263,698,
%U A062104 1544,2390,0,1,3,10,30,90,269,774,2016,4406,6796,0,1,3,10,30,90,270
%N 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.
%C A062104 Table formatted as a square array shows the top-left corner of the infinite board.
%e A062104 Array begins:
%e A062104 0       0       0       0       0       0       0       0       0       0       0       0 ...
%e A062104 1       1       1       1       1       1       1       1       1       1       1 ...
%e A062104 2       3       3       3       3       3       3       3       3       3 ...
%e A062104 6       9       10      10      10      10      10      10      10 ...
%e A062104 15      25      29      30      30      30      30      30 ...
%e A062104 40      69      84      89      90      90      90 ...
%e A062104 109     193     242     263     269     270 ...
%e A062104 302     544     698     774 ...
%e A062104 846     1544    2016 ...
%e A062104 2390    4406 ...
%e A062104 6796 ...
%p A062104 [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) );
%p A062104 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));
%p A062104 else RETURN(ChessPawnTriangle(r-1,c-1)+ChessPawnTriangle(r-1,c)+ChessPawnTriangle(r-1,c+1)); fi; end;
%t A062104 trinv[n_] := Floor[(1 + Sqrt[8 n + 1])/2];
%t A062104 CPTSeq[n_] := ChessPawnTriangle[(1 + (n - ((trinv[n]*(trinv[n] - 1))/2))), ((((trinv[n] - 1)*(((1/2)*trinv[n]) + 1)) - n) + 1)];
%t A062104 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]];
%t A062104 Table[CPTSeq[j], {j, 0, 91}] (* _Jean-François Alcover_, Mar 06 2016, adapted from Maple *)
%Y A062104 A062106 gives the left column and A062107 the diagonal of the table. A062105 is a more regular variant. Cf. also A062103. Trinv given at A054425.
%K A062104 nonn,tabl
%O A062104 0,6
%A A062104 _Antti Karttunen_, May 30 2001
%E A062104 Edited by _N. J. A. Sloane_, May 22 2014