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.

A209297 Triangle read by rows: T(n,k) = k*n + k - n, 1 <= k <= n.

Original entry on oeis.org

1, 1, 4, 1, 5, 9, 1, 6, 11, 16, 1, 7, 13, 19, 25, 1, 8, 15, 22, 29, 36, 1, 9, 17, 25, 33, 41, 49, 1, 10, 19, 28, 37, 46, 55, 64, 1, 11, 21, 31, 41, 51, 61, 71, 81, 1, 12, 23, 34, 45, 56, 67, 78, 89, 100, 1, 13, 25, 37, 49, 61, 73, 85, 97, 109, 121, 1, 14, 27
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 19 2013

Keywords

Comments

From Michel Marcus, May 18 2021: (Start)
The n-th row of the triangle is the main diagonal of an n X n square array whose elements are the numbers from 1..n^2, listed in increasing order by rows.
[1 2 3 4 5]
[1 2 3 4] [6 7 8 9 10]
[1 2 3] [5 6 7 8] [11 12 13 14 15]
[1 2] [4 5 6] [9 10 11 12] [16 17 18 19 20]
[1] [3 4] [7 8 9] [13 14 15 16] [21 22 23 24 25]
-----------------------------------------------------------
1 1 4 1 5 9 1 6 11 16 1 7 13 19 25
(End)

Examples

			From _Muniru A Asiru_, Oct 31 2017: (Start)
Triangle begins:
  1;
  1,  4;
  1,  5,  9;
  1,  6, 11, 16;
  1,  7, 13, 19, 25;
  1,  8, 15, 22, 29, 36;
  1,  9, 17, 25, 33, 41, 49;
  1, 10, 19, 28, 37, 46, 55, 64;
  1, 11, 21, 31, 41, 51, 61, 71, 81;
  1, 12, 23, 34, 45, 56, 67, 78, 89, 100;
  ... (End)
		

Crossrefs

Cf. A162610; A000012 (left edge), A000290 (right edge), A006003 (row sums), A001844 (central terms), A026741 (number of odd terms per row), A142150 (number of even terms per row), A221490 (number of primes per row).

Programs

  • GAP
    Flat(List([1..10^3], n -> List([1..n], k -> k * n + k - n))); # Muniru A Asiru, Oct 31 2017
  • Haskell
    a209297 n k = k * n + k - n
    a209297_row n = map (a209297 n) [1..n]
    a209297_tabl = map a209297_row [1..]
    
  • Mathematica
    Array[Range[1, #^2, #+1]&,10] (* Paolo Xausa, Feb 08 2024 *)

Formula

T(n,k) = (k-1)*(n+1)+1.