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

A157790 Least number of lattice points on two opposite sides from which every point of a square n X n lattice is visible.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 3, 4, 4, 4, 3, 4, 3, 4, 4, 4, 4, 6, 4, 5, 5, 4, 4, 7, 4, 5, 5, 6, 4, 8, 4, 6, 5, 6, 4, 8, 4, 6, 5, 7, 4, 8, 4, 6, 6, 6, 4, 8, 4, 8, 5, 6, 4, 8, 5, 7, 5, 6, 4, 8, 5, 6, 6, 6, 5, 8, 4, 6, 5
Offset: 1

Views

Author

T. D. Noe, Mar 06 2009

Keywords

Comments

That is, the points are chosen from the 2n points on two opposite sides of the n X n lattice.

Examples

			a(8) = 3 because all 64 points are visible from (1,1), (1,2), and (8,2).
a(9) = 4 because all 81 points are visible from (1,1), (1,2), (9,1), and (9,2).
		

Crossrefs

Programs

  • Mathematica
    Join[{1}, Table[hidden=Table[{},{n^2}]; edgePts={}; Do[pt1=(c-1)*n+d; If[c==1||c==n, 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,k]; i=0; While[i
    				

Extensions

More terms from Lars Blomberg, Nov 06 2014

A157791 Least number of lattice points on two adjacent sides from which every point of a square n X n lattice is visible.

Original entry on oeis.org

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, 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, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 1

Views

Author

T. D. Noe, Mar 06 2009

Keywords

Comments

That is, the points are chosen from the 2n-1 points on two adjacent sides of the n X n lattice.

Examples

			a(11)= 4 because all 121 points are visible from (1,1), (1,2), (2,1), and (1,4).
a(25)= 4 because all 625 points are visible from (1,2), (4,1), (6,1), and (23,1).
		

Crossrefs

Programs

  • Mathematica
    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
    				

Extensions

More terms from Lars Blomberg, Nov 06 2014
Showing 1-2 of 2 results.