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.

Showing 1-4 of 4 results.

A062107 Diagonal of table A062104.

Original entry on oeis.org

0, 1, 3, 10, 30, 90, 270, 810, 2430, 7290, 21870, 65610, 196830, 590490, 1771470, 5314410, 15943230, 47829690, 143489070, 430467210, 1291401630, 3874204890, 11622614670, 34867844010, 104603532030, 313810596090, 941431788270
Offset: 1

Views

Author

Antti Karttunen, May 30 2001

Keywords

Crossrefs

Except for initial terms, same as A005052.

Programs

  • Maple
    [seq(ChessPawnTriangle(j,j),j=1..50)];

Formula

a(n) = 10*3^(n-4) for n >= 4.
From Paul Barry, Oct 15 2004: (Start)
G.f.: x^2(1+x^2)/(1-3x);
a(n) = Sum_{k=0..n-2} 3^(n-k-2)binomial(1, k/2)(1+(-1)^k)/2. (End)

A062105 Square array read by antidiagonals: number of ways a pawn-like piece (with the initial 2-step move forbidden and starting from any square on the back rank) can end at various squares on an infinite chessboard.

Original entry on oeis.org

1, 1, 2, 1, 3, 5, 1, 3, 8, 13, 1, 3, 9, 22, 35, 1, 3, 9, 26, 61, 96, 1, 3, 9, 27, 75, 171, 267, 1, 3, 9, 27, 80, 216, 483, 750, 1, 3, 9, 27, 81, 236, 623, 1373, 2123, 1, 3, 9, 27, 81, 242, 694, 1800, 3923, 6046, 1, 3, 9, 27, 81, 243, 721, 2038, 5211, 11257, 17303, 1, 3, 9, 27
Offset: 0

Views

Author

Antti Karttunen, May 30 2001

Keywords

Comments

Table formatted as a square array shows the top-left corner of the infinite board.
The same array can also be constructed by the method used for constructing A217536, except with a top row consisting entirely of 1's instead of the natural numbers. - WG Zeist, Aug 25 2024

Examples

			Array begins:
 1       1       1       1       1       1       1       1       1       1       1
 2       3       3       3       3       3       3       3       3       3       3
 5       8       9       9       9       9       9       9       9       9 ...
 13      22      26      27      27      27      27      27      27 ...
 35      61      75      80      81      81      81 ...
 96      171     216     236     242     243 ...
 267     483     623     694     721 ...
 750     1373    1800    2038 ...
 2123    3923    5211 ...
 6046    11257 ...
 17303  ...
 ...
Formatted as a triangle:
 1,
 1, 2,
 1, 3, 5,
 1, 3, 8, 13,
 1, 3, 9, 22, 35,
 1, 3, 9, 26, 61, 96,
 1, 3, 9, 27, 75, 171, 267,
 1, 3, 9, 27, 80, 216, 483, 750,
 1, 3, 9, 27, 81, 236, 623, 1373, 2123,
 1, 3, 9, 27, 81, 242, 694, 1800, 3923, 6046,
 1, 3, 9, 27, 81, 243, 721, 2038, 5211, 11257, 17303,
 ...
		

Crossrefs

A005773 gives the left column of the table. A000244 (powers of 3) gives the diagonal of the table. Variant of A062104. Cf. also A062103, A020474, A217536.

Programs

  • Maple
    [seq(CPTVSeq(j),j=0..91)]; CPTVSeq := n -> ChessPawnTriangleV( (2+(n-((trinv(n)*(trinv(n)-1))/2))), ((((trinv(n)-1)*(((1/2)*trinv(n))+1))-n)+1) );
    ChessPawnTriangleV := 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; RETURN(ChessPawnTriangleV(r-1,c-1)+ChessPawnTriangleV(r-1,c)+ChessPawnTriangleV(r-1,c+1)); end;
    M:=12; T:=Array(0..M,0..M,0);
    T[0,0]:=1; T[1,1]:=1;
    for i from 1 to M do T[i,0]:=0; od:
    for n from 2 to M do for k from 1 to n do
    T[n,k]:= T[n,k-1]+T[n-1,k-1]+T[n-2,k-1];
    od: od;
    rh:=n->[seq(T[n,k],k=0..n)];
    for n from 0 to M do lprint(rh(n)); od: # N. J. A. Sloane, Apr 11 2020
  • Mathematica
    T[n_, k_] := T[n, k] = If[n < 1 || k < 1, 0, If[n == 1, 1, T[n - 1, k - 1] + T[n - 1, k] + T[n - 1, k + 1]]]; Table[T[n - k + 1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Mar 04 2016, adapted from PARI *)
  • PARI
    T(n,k)=if(n<1 || k<1,0,if(n==1,1,T(n-1,k-1)+T(n-1,k)+T(n-1,k+1)))

Extensions

Edited by N. J. A. Sloane, May 22 2014

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.

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Antti Karttunen, May 30 2001

Keywords

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.

Crossrefs

A009766, A049604, A062104, trinv given at A054425.

Programs

  • 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 *)

A062106 Number of ways a black pawn (from any starting square on the second back rank) can (theoretically) end on the n-th square of the leftmost file counted from the back rank.

Original entry on oeis.org

0, 1, 2, 6, 15, 40, 109, 302, 846, 2390, 6796, 19426, 55767, 160668, 464305, 1345282, 3906701, 11367696, 33135987, 96740610, 282831981, 827939880, 2426431239, 7118546874, 20904025380, 61439768166, 180725813478, 532004277518
Offset: 1

Views

Author

Antti Karttunen, May 30 2001

Keywords

Crossrefs

The left column of table A062104. Cf. also A062107.

Programs

  • Maple
    [seq(ChessPawnTriangle(j,1),j=1..40)];
Showing 1-4 of 4 results.