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.

A287618 Triangle read by rows: T(j,k) is the number of distinct edge segments in a j X k rectangular grid.

Original entry on oeis.org

1, 2, 1, 3, 3, 2, 3, 3, 4, 2, 4, 4, 5, 5, 3, 4, 4, 5, 5, 6, 3, 5, 5, 6, 6, 7, 7, 4, 5, 5, 6, 6, 7, 7, 8, 4, 6, 6, 7, 7, 8, 8, 9, 9, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 5, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 6, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 7
Offset: 1

Views

Author

Doug Bell, May 28 2017

Keywords

Comments

This gives the number of edge segments that are distinct with respect to rotation and mirror images. Sequence is arranged so that j <= k (since 2 X 3 and 3 X 2 are equivalent grids), first by increasing j, then by increasing k: a(1) = 1 X 1 = 1, a(2) = 1 X 2 = 2, a(3) = 2 X 2 = 1, a(4) = 1 X 3 = 3.
Here j = A002260(n), k = A002024(n), and n = A000217(k-1) + j, then a(n) = if j = k, ceiling(j/2), else ceiling(j/2) + ceiling(k/2).

Examples

			Triangle begins:
  1;
  2, 1;
  3, 3, 2;
  3, 3, 4, 2;
  4, 4, 5, 5, 3;
  4, 4, 5, 5, 6, 3;
  5, 5, 6, 6, 7, 7, 4;
...
For n = 9, the a(9) = 4 distinct edge segments [A,B,C,D] for a 3 X 4 rectangular grid are:
  + - - - - +       + A B B A +
  |         |       C         C
  |         |  -->  D         D
  |         |       C         C
  + - - - - +       + A B B A +.
		

Crossrefs

Cf. A287688 (number of distinct edge segment pairs).

Programs

  • Mathematica
    Table[Ceiling[j/2] + Boole[j != k] Ceiling[k/2], {j, 14}, {k, j}] // Flatten (* Michael De Vlieger, Jun 09 2017 *)