%I #15 Jan 16 2019 04:14:27
%S 2,5,13,17,34,41,61,74,97,113,137,157,194,221,250,281,317,353,397,433,
%T 482,521,569,617,674,725,778,829,898,953,1021,1082,1154,1217,1289,
%U 1361,1433,1517,1597,1669,1762,1825,1933,2018,2113,2197,2297,2393,2498,2594
%N Forest-and-trees problem: square of distance to most distant visible tree.
%C In an arbitrarily large pine plantation, a tree with a trunk of radius 1/n is located at each of the lattice points of a square lattice (whose rows are spaced one unit apart), except for one empty lattice point near the center of the plantation. For an observer located at the empty lattice point, how far away is the most distant visible tree trunk? The sequence a(n) is defined as the square of the distance from the observer to the most distant lattice point at which a visible tree trunk is located. (Each tree trunk is assumed to be a vertical cylinder, centered at its respective lattice point. A tree trunk is considered "visible" unless it is completely obscured from view by one or more other tree trunks.)
%C It is known that, for any coprime x and y, the closest point to the line from (0,0) to (x,y) is 1/sqrt(x^2 + y^2) units away from it (see e.g. the first linked paper in A047896). Since tree trunks intersect lines that are closer than 1/n units, we must have that a(n) < n^2. In addition, a(n) cannot be divisible by the square of any prime p not congruent to 1 modulo 4, since this forces x and y to have common factor p. Combining this with the criteria for a(n) to be a sum of two squares, we have that a(n) is the largest number < n^2 that is either a product of primes congruent to 1 modulo 4 or twice such a product. - _Charlie Neder_, Jan 15 2019
%H Jon E. Schoenfield, <a href="/A124255/b124255.txt">Table of n, a(n) for n = 2..3000</a>
%H A different but related problem is addressed at <a href="https://web.archive.org/web/20090706200009/acm.uva.es/p/v1/149.html">Forests</a>.
%e Example: at n = 5, there are 40 visible tree trunks; defining the origin as the location of the observer, they are the ones located at (1,0), (4,1), (3,1), (2,1), (3,2), (1,1) and all the additional locations that result from using every possible reflection of them across the x-axis, the y-axis, or the diagonal, y=x. (The tree trunk at (4,3) is considered completely obscured by ones at (3,2) and (1,1), each of which is tangent to the line 4y = 3x.)
%e The most distant visible tree trunks are the ones located at the lattice point (4,1) and its symmetrical locations; the square of their distance from the origin is 17, so a(5) = 17.
%Y Cf. A124254, A124256.
%K nonn
%O 2,1
%A _Jon E. Schoenfield_, Oct 22 2006