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.

Previous Showing 11-15 of 15 results.

A178793 These are the y coordinates of isolated visible lattice points in the plane.

Original entry on oeis.org

55, 175, 551, 575, 589, 609, 679, 741, 741, 791, 799, 805, 875, 945, 987, 987, 995, 1035, 1065, 1105, 1105, 1159, 1209, 1275, 1309, 1309, 1309, 1407, 1421, 1463, 1463, 1463, 1495, 1495, 1551, 1581, 1581, 1611, 1625, 1639, 1651, 1665, 1665, 1665, 1695
Offset: 1

Views

Author

Gregg Whisler, Jun 15 2010

Keywords

Comments

From Gregg Whisler, Jun 21 2010: (Start)
a(n) is also A157428 + 1. [Charles R Greathouse IV points out that this is false, since (1308, 1274) is in (A157428, A157429) but not in (A178793, A178794). Oct 17 2012]
An isolated lattice point is surrounded (in a Moore neighborhood of r=1) in the Z^2 lattice of points by 8 points that are not visible from the origin. (End)

Crossrefs

Cf. A157428, A157429, A178794 (corresponding x coordinates), A216467.

Programs

  • Mathematica
    Table[Replace[Select[First/@Position[Partition[CoprimeQ[n,Range[n]],3,1],{False,True,False},{1}]+1, Outer[CoprimeQ, n+ {-1,1},#1+{-1,0,1}]=={{False,False,False},{False,False,False}}&],{{}-> Sequence[], list_:>Sequence@@ ({#1,n}&)/@list}],{n,2000}][[All, 2]] (* Eric Rowland *)

Extensions

More terms (until the corresponding first x coordinate (21) repeats) from Gregg Whisler, Jun 21 2010

A178794 These are the x coordinates of the isolated visible lattice points in the plane.

Original entry on oeis.org

21, 99, 115, 369, 495, 475, 195, 259, 265, 225, 375, 741, 741, 649, 323, 377, 399, 1001, 1001, 441, 987, 609, 755, 1001, 545, 645, 1035, 407, 1275, 153, 645, 1275, 51, 1221, 485, 35, 805, 715, 441, 595, 1015, 221, 1001, 1183, 371, 391, 575, 519, 645, 1065
Offset: 1

Views

Author

Gregg Whisler, Jun 15 2010

Keywords

Comments

An isolated lattice point is surrounded (in a Moore neighborhood) by 8 points that are not visible from the origin. I have also submitted the corresponding sequence of denominators.
From Gregg Whisler, Jun 21 2010: (Start)
a(n) is also A157429 + 1.
These are also the x coordinates of the isolated visible lattice points in Z^2. (End)

Crossrefs

Cf. A178793 (corresponding y coordinates), A157428, A157429, A216467.

Programs

  • Mathematica
    Table[Replace[Select[First/@Position[Partition[CoprimeQ[n,Range[n]],3,1],{False,True,False},{1}]+1, Outer[CoprimeQ, n+ {-1,1},#1+{-1,0,1}]=={{False,False,False},{False,False,False}}&],{{}-> Sequence[], list_:>Sequence@@ ({#1,n}&)/@list}],{n,2000}][[All, 1]] (* Eric Rowland *)

Extensions

More terms (until the initial 21 repeats) from Gregg Whisler, Jun 21 2010

A216467 Smallest numbers in the coordinates of the isolated visible lattice points in the infinite square grid.

Original entry on oeis.org

21, 35, 39, 45, 51, 55, 57, 69, 75, 77, 85, 87, 91, 93, 95, 99, 105, 111, 115, 117, 119, 123, 133, 135, 141, 143, 145, 147, 153, 155, 159, 161, 165, 171, 175, 177, 183, 185, 187, 189, 195, 201, 203, 205, 207, 209, 213, 215, 217, 219, 221, 225, 231, 235, 237, 244, 245
Offset: 1

Views

Author

Gregg Whisler, Sep 07 2012

Keywords

Comments

See A178793, A178794 for terminology.
It is not clear to me how many - if any! - of these terms are known to be correct. - N. J. A. Sloane, Oct 17 2012
From Charlie Neder, Jun 27 2018: (Start)
For row k to contain an isolated lattice point, k must contain a pair (m-1,m+1) of nontotatives, and both k-1 and k+1 must contain a triple of consecutive nontotatives. The CRT can then be used to "align" the groups into a box containing a lattice point. We consider the cases when k is odd and when k is even:
a) k is odd:
k cannot be a prime p or a power of a prime, because then the nontotatives to k are precisely the multiples of p, which contain no pairs since k is odd and therefore p > 2. As long as k is divisible by at least two odd primes, a pair can be found by the CRT.
k-1 and k+1 are even but cannot be powers of two, since then the nontotatives would be the even numbers, which contain no triples. As long as they each have at least one odd divisor, then all the odd nontotatives will be centers of triples.
b) k is even:
There are no other restrictions on k itself, since pairs are very easy to find for even k. (e.g. for any prime p not dividing k, (p-1,p+1) is a valid pair)
k-1 and k+1 are both odd and must be the products of at least three distinct primes, since a triple could not form otherwise. The CRT can be used to find triples as long as this is the case.
The first such even k is 664, with isolated point (189449,664) on it. (End)

Crossrefs

Programs

  • Mathematica
    Select[Range[300], If[OddQ[#], !PrimePowerQ[#] && !PrimePowerQ[# - 1] && !PrimePowerQ[# + 1], PrimeOmega[# - 1] > 2 && PrimeOmega[# + 1] > 2]&] (* Jean-François Alcover, Sep 02 2019, after Andrew Howroyd *)
  • PARI
    select(k->if(k%2, !isprimepower(k) && !isprimepower(k-1) && !isprimepower(k+1), omega(k-1)>2 && omega(k+1)>2), [1..300]) \\ Andrew Howroyd, Jun 27 2018

Extensions

Several missing terms added by Charlie Neder, Jun 27 2018
More terms from Jean-François Alcover, Sep 02 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

A332583 Label only the prime-numbered position 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, 19, 23, 29, 41, 47, 59, 61, 67, 71, 79, 83, 89, 97, 103, 107, 109, 113, 131, 137, 149, 167, 173, 179, 181, 191, 193, 199, 223, 227, 229, 239, 251, 263, 271, 277, 283, 293, 311, 317, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 409, 419, 433, 439, 443, 449, 457, 461, 467, 479, 487, 491, 499, 503
Offset: 1

Views

Author

Scott R. Shannon, Feb 17 2020

Keywords

Comments

Any grid point labeled with a prime number and with coordinates (x,y) relative to 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 may have another prime grid point directly between it and the central point and will thus not be visible.
For a square spiral of size 10001 by 10001, slightly over 100 million numbers, a total of 5762536 primes are present, of which 4811013 are visible. This gives a ratio of visible primes to all primes of about 0.835.

Examples

			The 2D grid is shown below. The primes that are blocked from the central 1 square are in parentheses; these all have another 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) = 19 as primes 11,13,17 are blocked from the central 1 point by points with prime numbers 2,3,5 respectively.
a(14) = 79 as although the point 79 has relative coordinates of (2,-4) from the central square, gcd(|2|,|-4|) = 2, there is no other prime at coordinate (1,-2), thus it is visible. This square is not visible from the central square when nonprime points are also considered in the spiral.
		

Crossrefs

Extensions

Edited by N. J. A. Sloane, Feb 17 2020
Previous Showing 11-15 of 15 results.