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

A157720 Least number of edge lattice points 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, 3, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 5, 5, 4, 5, 5, 5, 4, 5, 5, 5
Offset: 1

Views

Author

T. D. Noe, Mar 06 2009

Keywords

Comments

This sequence, which is easier to compute than A157639, provides an upper bound for A157639. By using every other point on one side of the lattice, it is easy to see that a(n) <= ceiling(n/2).

Examples

			a(3) = 2 because all 9 points are visible from (1,1) or (1,2).
a(5) = 3 because all 25 points are visible from (1,1), (1,2), or (1,4).
a(11)= 4 because all 121 points are visible from (1,1), (1,2), (2,1), or (1,4).
a(27)= 5 because all 729 points are visible from (1,1), (1,2), (2,1), (1,3), or (1,4).
		

Programs

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

Extensions

More terms from Lars Blomberg, Nov 06 2014

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

A157792 Least number of lattice points on one side 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, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 25
Offset: 1

Views

Author

T. D. Noe, Mar 06 2009

Keywords

Comments

That is, the points are chosen from the n points on one side of the n X n lattice. It appears that a(n) = ceiling((n+1)/3) for n > 8.

Examples

			a(3) = 2 because all 9 points are visible from (1,1) and (1,2).
a(5) = 3 because all 25 points are visible from (1,1), (1,2), and (1,4).
a(7) = 4 because all 49 points are visible from (1,1), (1,2), (1,3), and (1,6).
a(12)= 5 because all 144 points are visible from (1,1), (1,3), (1,6), (1,8), and (1,11).
		

Crossrefs

Programs

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

Formula

Conjectures from Chai Wah Wu, Aug 05 2022: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n > 12.
G.f.: x*(x^11 - x^9 - x^7 + x^6 - x^5 + x^4 - x^3 + x^2 + 1)/(x^4 - x^3 - x + 1). (End)

Extensions

More terms from Lars Blomberg, Nov 06 2014

A165164 Smallest k such that no set of n lattice points gives visibility to every point of a square k X k lattice.

Original entry on oeis.org

4, 6, 24, 133
Offset: 1

Views

Author

Jon E. Schoenfield, Sep 06 2009

Keywords

Comments

At least n+1 lattice points must be selected as viewpoints in order to give visibility to all lattice points of a square a(n) X a(n) lattice.

Examples

			For k < 24, given a k X k square lattice, there is at least one way to select a set of 3 or fewer lattice points as viewpoints that, collectively, give visibility to all k^2 lattice points; at k=24, however, no such set of 3 points exists, so a(3)=24.
		

Crossrefs

Equals minimum k such that A157639(k) > n.
Showing 1-5 of 5 results.