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-3 of 3 results.

A354702 T(w,h) is an upper bound for the minimum number of grid points in a square grid covered by an arbitrarily positioned and rotated rectangle of width w and height h, where T(w,h) is a triangle read by rows.

Original entry on oeis.org

0, 1, 2, 2, 4, 7, 2, 5, 9, 12, 3, 7, 13, 17, 21, 4, 8, 15, 20, 26, 32, 4, 9, 18, 22, 31, 36, 40, 5, 11, 20, 27, 36, 44, 49, 57, 6, 12, 24, 30, 41, 48, 54, 66, 72, 7, 14, 26, 35, 46, 55, 63, 74, 84, 96, 7, 15, 28, 37, 50, 60, 67, 81, 90, 105, 112, 8, 16, 31, 40, 55, 64, 72, 88, 96, 112, 120, 128
Offset: 1

Views

Author

Hugo Pfoertner, Jun 15 2022

Keywords

Comments

Grid points must lie strictly within the covering rectangle, i.e., grid points on the perimeter of the rectangle are not allowed.
These upper bounds were determined by an extensive random search, the results of which were stable. The proof that none of these bounds can be improved should be possible with a constructive technique such as integer linear programming applied to all combinatorially possible positions of the rectangle relative to the lattice.
A simple random search is implemented in the attached PARI program, which enables a plausibility check of the results for small covering rectangles. It also provides results for the maximum problem. Additional methods were used to obtain the results shown. In particular, angular orientations of the rectangle along connecting lines between all pairs of lattice points and extreme positions of the rectangle, where lattice points are very close to the corners of the rectangle, were investigated, using adjacent terms in A000404.

Examples

			The triangle begins:
    \ h 1   2   3   4   5   6   7   8   9   10   11   12
   w \ -------------------------------------------------
   1 |  0;  |   |   |   |   |   |   |   |    |    |    |
   2 |  1,  2;  |   |   |   |   |   |   |    |    |    |
   3 |  2,  4,  7;  |   |   |   |   |   |    |    |    |
   4 |  2,  5,  9, 12;  |   |   |   |   |    |    |    |
   5 |  3,  7, 13, 17, 21;  |   |   |   |    |    |    |
   6 |  4,  8, 15, 20, 26, 32;  |   |   |    |    |    |
   7 |  4,  9, 18, 22, 31, 36, 40;  |   |    |    |    |
   8 |  5, 11, 20, 27, 36, 44, 49, 57;  |    |    |    |
   9 |  6, 12, 24, 30, 41, 48, 54, 66, 72;   |    |    |
  10 |  7, 14, 26, 35, 46, 55, 63, 74, 84,  96;   |    |
  11 |  7, 15, 28, 37, 50, 60, 67, 81, 90, 105, 112;   |
  12 |  8, 16, 31, 40, 55, 64, 72, 88, 96, 112, 120, 128
		

Crossrefs

Cf. A293330 (diagonal).
Cf. A291259 (similar problem for circular disks).
Cf. A000404 (used to check extreme positions of grid points).

Programs

  • PARI
    \\ See link.
    
  • PARI
    \\ See also program link in A355241.

A355242 T(w,h) is the minimum integer slope >= 1 that can be chosen as orientation of a w X h rectangle such that the upper bound for the minimum number of covered grid points A354702(w,d) can be achieved by a suitable translation of the rectangle, where T(w,h) and A354702 are triangles read by rows. T(w,h) = -1 if no integer slope satisfying this condition exists.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 3, 3, 1, 2, 1, 2, 1, 1, 2, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Hugo Pfoertner, Jun 25 2022

Keywords

Comments

T(17,13) = -1 is the first occurrence of the situation that it is not possible to reach the upper limit A354702(17,13) = 215 with a rectangle whose long side has an integer slope. (17 X 13)-rectangles with integer slope cannot cover less than 216 grid points. To achieve 215 grid points requires a slope of 3/2, i.e. A355241(17,13) = 3. See the linked file for related illustrations.

Examples

			The triangle begins:
    \ h 1  2  3  4  5  6  7  8  9 10 11 12 13
   w \ --------------------------------------
   1 |  1; |  |  |  |  |  |  |  |  |  |  |  |
   2 |  1, 1; |  |  |  |  |  |  |  |  |  |  |
   3 |  1, 1, 2; |  |  |  |  |  |  |  |  |  |
   4 |  1, 1, 2, 1; |  |  |  |  |  |  |  |  |
   5 |  1, 1, 2, 1, 3; |  |  |  |  |  |  |  |
   6 |  1, 1, 2, 1, 3, 1; |  |  |  |  |  |  |
   7 |  1, 1, 1, 1, 1, 1, 1; |  |  |  |  |  |
   8 |  1, 1, 2, 1, 3, 1, 1, 2; |  |  |  |  |
   9 |  1, 1, 1, 1, 3, 1, 1, 1, 1; |  |  |  |
  10 |  1, 1, 2, 1, 3, 3, 1, 2, 1, 2; |  |  |
  11 |  1, 1, 2, 1, 3, 1, 1, 2, 1, 1, 1; |  |
  12 |  1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1; |
  13 |  1, 1, 2, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1
		

Crossrefs

Cf. A354702.
A355241 is similar, but with slopes chosen from the list 1/2, 1, 3/2, 2, ... .

A355244 T(w,h)/2 is the minimum slope >= 1/2 that can be chosen as orientation of a w X h rectangle such that the lower bound for the maximum number of covered grid points A354704(w,d) can be achieved by a suitable translation of the rectangle, where T(w,h) and A354704 are triangles read by rows. T(w,h) = -1 if no slope satisfying this condition exists.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 6, 2, 2, 2, 1, 6, 2, 6, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 6, 2, 1, 2, 2, 1, 3, 2, -1, 2, 2, 3, 2, 1, 2, -1, 3, 2, 1, 2, 2, 2, 2, 6, 2, 1, 2, 2, 1, 2
Offset: 1

Views

Author

Hugo Pfoertner, Jun 29 2022

Keywords

Examples

			The triangle begins:
    \ h 1  2  3  4  5  6  7  8  9 10 11 12 13
   w \ --------------------------------------
   1 |  1; |  |  |  |  |  |  |  |  |  |  |  |
   2 |  1, 1; |  |  |  |  |  |  |  |  |  |  |
   3 |  1, 2, 2; |  |  |  |  |  |  |  |  |  |
   4 |  1, 3, 2, 2; |  |  |  |  |  |  |  |  |
   5 |  1, 1, 2, 2, 2; |  |  |  |  |  |  |  |
   6 |  1, 1, 2, 2, 2, 2; |  |  |  |  |  |  |
   7 |  1, 6, 2, 2, 2, 1, 6; |  |  |  |  |  |
   8 |  2, 6, 2, 2, 2, 2, 2, 2; |  |  |  |  |
   9 |  1, 1, 2, 2, 2, 1, 1, 2, 1; |  |  |  |
  10 |  2, 1, 2, 2, 2, 2, 2, 2, 2, 2; |  |  |
  11 |  2, 1, 2, 2, 2, 2, 6, 2, 1, 2, 2; |  |
  12 |  1, 3, 2,-1, 2, 2, 3, 2, 1, 2,-1, 3; |
  13 |  2, 1, 2, 2, 2, 2, 6, 2, 1, 2, 2, 1, 2
.
The first linked illustration shows examples where 2 slopes lead to the same number of covered grid points, where then the smallest multiple of 1/2 is used as a term in the sequence.
The second illustration shows the two examples where it is not possible to cover the maximum number of grid points with a rectangle whose side slope is an integer multiple of 1/2.
		

Crossrefs

Cf. A355241 (similar, but with number of covered grid points minimized).

Programs

  • PARI
    /* See Pfoertner link. The program can be used to validate the given terms by calling it successively with the slope parameter k, starting with k = 1/2, 2/2=1, 3/2, (4/2 = 2 already covered by 1/2 via symmetry), 5/2, 6/2=3 for the desired rectangle size w X h, until the number of grid points given by A354704(w,k) is reached for the first time as a result. If the slope parameter is not specified, the program attempts to approximate A354704(w,k) and determine a location of the rectangle that maximizes the free margin between the peripheral grid points and the perimeter of the rectangle. */
Showing 1-3 of 3 results.