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-10 of 11 results. Next

A157428 Lower left-hand x-coordinates of invisible 2 X 2 squares with 0 < y < x.

Original entry on oeis.org

54, 174, 550, 574, 588, 608, 678, 740, 740, 790, 798, 804, 874, 944, 986, 986, 994, 1034, 1064, 1104, 1104, 1158, 1208, 1274, 1308, 1308, 1308, 1308, 1406, 1420, 1462, 1462, 1462, 1494, 1494, 1550, 1580, 1580, 1610, 1624, 1638, 1650, 1664, 1664, 1664
Offset: 1

Views

Author

Eric W. Weisstein, Mar 01 2009

Keywords

Examples

			{54, 20}, {174, 98}, {550, 114}, {574, 368}, {588, 494}, {608, 474}, ...
		

Crossrefs

A157426 Lower left-hand x-coordinates of invisible 1x1 squares with 0 < y < x.

Original entry on oeis.org

20, 35, 35, 54, 65, 69, 77, 84, 84, 95, 98, 98, 99, 99, 104, 104, 104, 110, 114, 114, 119, 119, 132, 132, 135, 135, 147, 153, 153, 159, 161, 170, 170, 170, 174, 174, 175, 185, 185, 186, 186, 188, 189, 189, 189, 189, 189, 195, 195, 195
Offset: 1

Views

Author

Eric W. Weisstein, Mar 01 2009

Keywords

Examples

			{20, 14}, {35, 14}, {35, 20}, {54, 44}, {65, 39}, {69, 45}, {77, 21}, {84, 34}, {84, 50}, {95, 75}, ...
		

Crossrefs

A325604 Lower left-hand x-coordinate for 3 X 3 invisible forest with 0 < x < y.

Original entry on oeis.org

1274, 1884, 1924, 1448, 594, 2254, 2364, 2210, 1598, 1000, 2624, 740, 664, 2408, 1924, 1924, 494, 1000, 230, 2914, 650, 1000, 644, 3794, 1924, 3794, 2430, 104, 4146, 3534, 4234, 1748, 2254, 2408, 1274, 1064, 4640, 4520, 2484, 3794
Offset: 1

Views

Author

Benjamin Hutz, May 10 2019

Keywords

Comments

These are 3 X 3 rectangles of lattice points not visible along straight lines of sight from the origin. The sequence is ordered by Euclidean distance from (0,0).

Examples

			(1274,1308), (1884,2000), (1924,2330), (1448,2714), (594,3128), (2254,2540), (2364,2924), (2210,3080), (1598,3484), (1000,3794)
		

Crossrefs

A331400 The grid points visible from the central point of an infinite 2D square lattice where all grid points are numbered as in the Ulam spiral.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 27, 29, 30, 32, 33, 35, 36, 38, 39, 41, 42, 44, 45, 47, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 83, 84, 85, 87, 88, 89, 90, 92, 93, 94, 95, 97, 98, 99, 100, 102, 103, 104, 105, 107, 108, 109, 110, 112, 113, 114, 115
Offset: 1

Views

Author

Scott R. Shannon, Jan 16 2020

Keywords

Comments

Any grid point with relative coordinates (x,y) from the central grid point, which is numbered 1, and where the greatest common divisor (gcd) of |x| and |y| equals 1 will be visible from the central point. Grid points where gcd(|x|,|y|) > 1 will have another point directly between it and the central point and will thus not be visible.
In an infinite 2D square lattice the ratio of visible grid points to all points is 6/pi^2, the same as the probability of two random numbers being relative prime.

Examples

			a(1) = 2 to a(8) = 9 are the eight adjacent grid points to point 1, thus all are visible from that point.
a(9) = 10 is the first non-adjacent point to square 1, but as it is located at relative coordinates (2,-1) it is visible as gcd(|-2|,|1|) = 1.
The point numbered 11 is the first point not visible from point 1 as it has relative coordinates (2,0) and gcd(|2|,|0|) = 2.
		

Crossrefs

A325602 Lower left-hand x-coordinate for 2 X 2 invisible forest with 0 < x < y.

Original entry on oeis.org

14, 14, 20, 44, 39, 21, 45, 34, 50, 21, 44, 39, 54, 75, 45, 65, 34, 77, 74, 69, 90, 56, 50, 84, 76, 33, 84, 14, 20, 69, 55, 111, 75, 33, 14, 105, 35, 119, 95, 20, 56, 35, 74, 90, 110, 104, 76, 62, 20, 35
Offset: 1

Views

Author

Benjamin Hutz, May 10 2019

Keywords

Comments

These are 2 X 2 rectangles of lattice points not visible along straight lines of sight from the origin. The sequence is ordered by Euclidean distance from (0,0).

Examples

			(14,20), (14,35), (20,35), (44,54), (39,65), (21,77), (45,69), (34,84), ...
		

Crossrefs

Programs

  • Python
    def is_nxn(x,y,n):
        if all([gcd(x+a,y+b) != 1 for a in range(n) for b in range(n)]):
            return True
        return False
    def insert_item(pts, item, index):
        N = len(pts)
        if N == 0:
          return [item]
        elif N == 1:
            if item[index] < pts[0][index]:
                pts.insert(0,item)
            else:
                pts.append(item)
            return pts
        else: #binary insertion
            left = 1
            right = N
            mid = ((left + right)/2).floor()
            if item[index] < pts[mid][index]:
            # item goes into first half
                return insert_item(pts[:mid], item, index) + pts[mid:N]
            else:
            # item goes into second half
                return pts[:mid] + insert_item(pts[mid:N], item, index)
    B=1200
    L=[]
    for x in range(1,B):
        for y in range(x+1,B):
            if is_nxn(x,y,n=2):
                G=[x,y,x^2+y^2]
                L=insert_item(L, G, 2)

A325603 Lower left-hand y-coordinate for 2 X 2 invisible forest with 0 < x < y.

Original entry on oeis.org

20, 35, 35, 54, 65, 77, 69, 84, 84, 98, 99, 104, 99, 95, 114, 104, 119, 98, 110, 114, 104, 132, 135, 119, 132, 153, 135, 174, 174, 161, 175, 147, 170, 186, 189, 159, 189, 153, 170, 195, 189, 195, 185, 195, 185, 195, 209, 216, 224, 224
Offset: 1

Views

Author

Benjamin Hutz, May 10 2019

Keywords

Comments

These are 2 X 2 rectangles of lattice points not visible along straight lines of sight from the origin. The sequence is ordered by Euclidean distance from (0,0).

Examples

			(14,20), (14,35), (20,35), (44,54), (39,65), (21,77), (45,69), (34,84).
		

Crossrefs

Programs

  • SageMath
    def is_nxn(x,y,n):
        if all([gcd(x+a,y+b) != 1 for a in range(n) for b in range(n)]):
            return True
        return False
    def insert_item(pts, item, index):
        N = len(pts)
        if N == 0:
          return [item]
        elif N == 1:
            if item[index] < pts[0][index]:
                pts.insert(0,item)
            else:
                pts.append(item)
            return pts
        else: #binary insertion
            left = 1
            right = N
            mid = ((left + right)/2).floor()
            if item[index] < pts[mid][index]:
            # item goes into first half
                return insert_item(pts[:mid], item, index) + pts[mid:N]
            else:
            # item goes into second half
                return pts[:mid] + insert_item(pts[mid:N], item, index)
    B=1200
    L=[]
    for x in range(1,B):
        for y in range(x+1,B):
            if is_nxn(x,y,n=2):
                G=[x,y,x^2+y^2]
                L=insert_item(L, G, 2)

A157427 Lower left-hand y-coordinates of invisible 1x1 squares with 0 < y < x.

Original entry on oeis.org

14, 14, 20, 44, 39, 45, 21, 34, 50, 75, 21, 77, 44, 54, 39, 65, 90, 74, 45, 69, 34, 84, 56, 76, 50, 84, 111, 33, 119, 105, 69, 75, 95, 152, 14, 20, 55, 74, 110, 33, 153, 140, 14, 35, 56, 132, 174, 20, 35, 90
Offset: 1

Views

Author

Eric W. Weisstein, Mar 01 2009

Keywords

Examples

			{20, 14}, {35, 14}, {35, 20}, {54, 44}, {65, 39}, {69, 45}, {77, 21}, {84, 34}, {84, 50}, {95, 75}, ...
		

Crossrefs

A325605 Lower left-hand y-coordinate for 3 X 3 invisible forest with 0 < x < y.

Original entry on oeis.org

1308, 2000, 2330, 2714, 3128, 2540, 2924, 3080, 3484, 3794, 3730, 4654, 4730, 4234, 4640, 4718, 5300, 5564, 5654, 4928, 5704, 5654, 5718, 4598, 5654, 4640, 5642, 6200, 4640, 5150, 4598, 6094, 5984, 5984, 6408, 6460, 4674, 4794, 6104, 5620
Offset: 1

Views

Author

Benjamin Hutz, May 31 2019

Keywords

Comments

These are 3 X 3 rectangles of lattice points not visible along straight lines of sight from the origin. The sequence is ordered by Euclidean distance from (0,0).

Examples

			1308 is a term because (1274, 1308) is the lower left-hand coordinate of a 3 X 3 invisible forest, i.e., gcd(1274+i, 1308+j) > 1 for 0 <= i <= 2 and 0 <= j <= 2.
Other such coordinates are (1884, 2000), (1924, 2330), (1448, 2714), (594, 3128), (2254, 2540), (2364, 2924), (2210, 3080), (1598, 3484), (1000, 3794).
		

Crossrefs

A325607 Lower left-hand y-coordinate for 4 X 4 invisible forest with 0 < x < y.

Original entry on oeis.org

10199370, 13125369, 13458288, 21374352, 22339875, 29634813, 39738060, 32719728, 42182412, 47211294, 51258282, 53418859, 43209969, 55756413, 48330114, 49362234, 62965329, 52850433, 72584082, 73167345, 73891893, 71088744, 61716444, 66526029, 69342999, 80514873, 71127132
Offset: 1

Views

Author

Benjamin Hutz, May 31 2019

Keywords

Comments

These are 4 X 4 rectangles of lattice points not visible along straight lines of sight from the origin. The sequence is ordered by Euclidean distance from (0,0).

Examples

			(7247643, 10199370), (6349914, 13125369), (13449225, 13458288), (3268473, 21374352), (16799913, 22339875)
		

Crossrefs

Extensions

a(6)-a(27) from Giovanni Resta, Jun 05 2019

A332582 Label the cells of the infinite 2D square lattice with the square spiral (or Ulam spiral), starting with 1 at the center; sequence lists primes that are visible from square 1.

Original entry on oeis.org

2, 3, 5, 7, 29, 41, 47, 83, 89, 97, 103, 107, 109, 113, 173, 179, 181, 191, 193, 199, 223, 293, 311, 317, 347, 353, 359, 443, 449, 457, 461, 467, 479, 487, 491, 499, 503, 509, 521, 523, 631, 641, 643, 647, 653, 659, 661, 673, 683, 691, 701, 709, 719, 727, 857, 863, 887, 929, 947, 953, 1091
Offset: 1

Views

Author

Scott R. Shannon, Feb 17 2020

Keywords

Comments

Any grid point with relative coordinates (x,y) from the central grid point, which is numbered 1, and where the greatest common divisor (gcd) of |x| and |y| equals 1 will be visible from the central point. Grid points where gcd(|x|,|y|) > 1 will have another point directly between it and the central point and will thus not be visible. In an infinite 2D square lattice the ratio of visible grid points to all points is 6/Pi^2, approximately 0.608, the same as the probability of two random numbers being relative prime.
For a square spiral of size 10001 X 10001, slightly over 100 million numbers, a total of 60803664 numbers are visible, of which 2155170 are prime. The total number of primes in the same range is 5762536, giving a ratio of visible primes to all primes of about 0.374. This is significantly lower than the ratio for all numbers of 0.608, indicating a prime is more likely to be hidden from the origin than a random number.
Primes p such that A174344(p) and A268038(p) are coprime. - Robert Israel, Feb 16 2024

Examples

			The 2D grid is shown below. Composite numbers are shown as a '*'. The primes that are blocked from the central 1 square are in parentheses; these all have another composite or prime number directly between their position and the central square.
.
.
    *----*----*--(61)---*--(59)---*----*
                                       |
  (37)---*----*----*----*----*--(31)   *
    |                             |    |
    *  (17)---*----*----*--(13)   *    *
    |    |                   |    |    |
    *    *    5----*----3    *   29    *
    |    |    |         |    |    |    |
    *  (19)   *    1----2  (11)   *  (53)
    |    |    |              |    |    |
   41    *    7----*----*----*    *    *
    |    |                        |    |
    *    *----*--(23)---*----*----*    *
    |                                  |
  (43)---*----*----*---47----*----*----*
.
.
a(1) = 2 to a(4) = 7 are all primes adjacent to the central 1 point, thus all are visible from that square.
a(5) = 29 as primes 11, 13, 17, 19, 23 are blocked from the central 1 point by points numbered 2, 3, 5, 6, 8 respectively.
		

Crossrefs

Programs

  • Maple
    x:= 0: y:= 0: R:= NULL: count:= 0:
    for i from 2 while count < 100 do
      if x >= y then
        if x < -y + 1 then x:= x+1
        elif x > y then y:= y+1
        else x:= x-1
        fi
      elif x <= -y then y:= y-1
        else x:= x-1
      fi;
      if isprime(i) and igcd(abs(x),abs(y))=1 then R:= R,i; count:= count+1 fi
    od:
    R; # Robert Israel, Feb 16 2024
Showing 1-10 of 11 results. Next