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.
%I A157791 #15 Feb 16 2025 08:33:09 %S A157791 1,1,2,2,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5, %T A157791 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, %U A157791 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 %N A157791 Least number of lattice points on two adjacent sides from which every point of a square n X n lattice is visible. %C A157791 That is, the points are chosen from the 2n-1 points on two adjacent sides of the n X n lattice. %H A157791 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/VisiblePoint.html">Visible Point</a> %e A157791 a(11)= 4 because all 121 points are visible from (1,1), (1,2), (2,1), and (1,4). %e A157791 a(25)= 4 because all 625 points are visible from (1,2), (4,1), (6,1), and (23,1). %t A157791 Join[{1}, Table[hidden=Table[{},{n^2}]; edgePts={}; Do[pt1=(c-1)*n+d; If[c==1||d==1, AppendTo[edgePts,pt1]; lst={}; Do[pt2=(a-1)*n+b; If[GCD[c-a,d-b]>1, AppendTo[lst,pt2]], {a,n}, {b,n}]; hidden[[pt1]]=lst], {c,n}, {d,n}]; edgePts=Sort[edgePts]; done=False; k=0; done=False; k=0; While[ !done, k++; len=Binomial[2n-1,k]; i=0; While[i<len, i++; s=Subsets[edgePts,{k},{i}][[1]]; If[Intersection@@hidden[[s]]=={}, done=True; Break[]]]]; k, {n,2,11}]] %Y A157791 Cf. A157639, A157720, A157790, A157792. %K A157791 hard,nonn %O A157791 1,3 %A A157791 _T. D. Noe_, Mar 06 2009 %E A157791 More terms from _Lars Blomberg_, Nov 06 2014