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.

A358556 Triangle read by rows: T(n,k) is the number of regions formed when n points are placed along each edge of a square that divide the edges into n+1 equal parts and a line is continuously drawn from the current point to that k points, 2 <= k <= 2*n, counterclockwise around the square until the starting point is again reached.

Original entry on oeis.org

2, 5, 21, 2, 5, 5, 4, 61, 2, 5, 29, 5, 73, 25, 105, 2, 5, 25, 5, 5, 31, 141, 11, 157, 2, 5, 5, 5, 85, 5, 153, 4, 25, 61, 229, 2, 5, 25, 5, 73, 33, 5, 15, 245, 71, 297, 22, 317, 2, 5, 25, 5, 65, 29, 165, 5, 269, 81, 333, 25, 385, 109, 401, 2, 5, 5, 5, 61, 5, 153, 16, 5, 91, 377, 4, 449, 125, 61, 37, 509, 2
Offset: 1

Views

Author

Scott R. Shannon, Nov 22 2022

Keywords

Comments

The starting point can be any of the 4*n points around the square as changing the starting point simply rotates and/or reflects the resulting pattern formed by the path to one of the four orthogonal directions around the square; this does not change the number of regions formed by the path.
The number of times the path formed by the line touches and leaves the edges of the square is lcm(4*n,k)/k. For k >= n this is the number of points in the star-shaped pattern formed by the path.
The table starts with k = 2 as T(n,1) = 5 for all values of n. The maximum k is 2*n as T(n,2*n + m) = T(n,2*n - m).

Examples

			The table begins:
2;
5, 21, 2;
5,  5  4, 61,  2;
5, 29, 5, 73, 25, 105,  2;
5, 25, 5,  5, 31, 141, 11, 157,  2;
5,  5, 5, 85,  5, 153,  4,  25, 61, 229,  2;
5, 25, 5, 73, 33,   5, 15, 245, 71, 297, 22, 317,   2;
5, 25, 5, 65, 29, 165,  5, 269, 81, 333, 25, 385, 109, 401,  2;
5,  5, 5, 61,  5, 153, 16,   5, 91, 377,  4, 449, 125,  61, 37, 509,   2;
5, 25, 5,  5, 25, 137,  5, 285,  5, 385, 31, 501, 141,  25, 11, 613, 169, 629, 2;
.
.
See the attached file for more examples.
		

Crossrefs

Cf. A358574 (vertices), A358627 (edges), A331452, A355798, A355838, A357058, A358407, A345459.

Formula

T(n,k) = A358627(n,k) - A358574(n,k) + 1 by Euler's formula.
T(n,2*n) = 2. The line cuts the square into two parts.
T(n,k) = 5 where n >= 2, k <= n, and k|(4*n). Four lines cut across the square's corners so four additional triangles are created.