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.

A153125 Triangle read by rows: T(n,k) = maximal number of squares that can be covered by a queen on an n X k chessboard, 1<=k<=n.

Original entry on oeis.org

1, 2, 4, 3, 6, 9, 4, 7, 10, 12, 5, 8, 11, 14, 17, 6, 9, 12, 15, 18, 20, 7, 10, 13, 16, 19, 22, 25, 8, 11, 14, 17, 20, 23, 26, 28, 9, 12, 15, 18, 21, 24, 27, 30, 33, 10, 13, 16, 19, 22, 25, 28, 31, 34, 36, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 12, 15, 18, 21, 24, 27, 30, 33, 36
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 20 2008

Keywords

Comments

Sums of rows give A153126; central terms give A016861;
A047461(n) = T(n,n);
T(n,2*k-1) = T(n-1,2*k-1) + 1 for 2*k-1

Examples

			Triangle T(n,k) begins:
1;
2,  4;
3,  6,  9;
4,  7, 10, 12;
5,  8, 11, 14, 17;
6,  9, 12, 15, 18, 20;
7, 10, 13, 16, 19, 22, 25;
8, 11, 14, 17, 20, 23, 26, 28;
		

Programs

  • Mathematica
    T[n_,k_]:=n+3*(k-1)-(1-Mod[n,2])*If[k==n,1,0];
    Flatten[Table[Table[T[n,k],{k,1,n}],{n,1,20}]]
    (* From Vaclav Kotesovec, Sep 07 2012 *)

Formula

T(n,k) = n + 3*(k-1) - (1 - n Mod 2)*delta_{n,k}, 1<=k<=n; delta is the Kronecker symbol.