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.

A383595 a(n) is the smallest prime k such that (prime(n), k, u, v) are the vertices of a square in Ulam's spiral, where k < u < v are all primes; or -1 if there is no such k.

Original entry on oeis.org

-1, -1, -1, 56527, 59, 67, 251, -1, -1, 2473, 3001, 43, 43, 41, 173, 1621, 61, 59, 13, 141937, 13, 13, 10459, 331, 33211, 643, 179, 41, 41, 1429, 11, 11, 59, 59, 13, 127, 163, 157, 169957, 47, 103, 56519, 683, 2843, 6841, 211, 199, 311, 59407, 439, 11, 137, 274831
Offset: 1

Views

Author

Gonzalo Martínez, May 01 2025

Keywords

Comments

For each prime number prime(n) in Ulam's spiral, we search for the least 3 primes k, u, v, with k < u < v, such that (prime(n), k, u, v) are the vertices of a square whose sides are parallel to the rows and columns of the spiral, where a(n) equals k.
Given a prime p, some vertices are close to p. For example, for prime 13, the vertices are (13, 67, 73, 79), while for others they are not, such as 7, where the least primes are (7, 56527, 58567, 58687). On the other hand, primes such as 2, 3, 5, 19 and 23 are not vertices of any square with prime vertices.
Conjecture: if a prime is vertex of a square of prime vertices, then it is vertex of infinitely many squares whose vertices are prime. For example, in the case of 11, some of them are: (11, 59, 127, 131), (11, 137, 233, 239), (11, 769, 977, 991).
Questions: Which prime numbers are not vertices of any square with prime vertices? What condition must they satisfy?
Are there infinite primes p and q which are vertices of two squares with prime vertices? For example, 47 and 353 are vertices of the squares (47, 353, 109, 347) and (47, 353, 173, 359).

Examples

			For A000040(5) = 11, it is observed that 11 together with 127, 131 and 59 are the vertices of a square whose center is 55. And this is the smallest square of prime vertices that has 11 as one of its vertices. Since 59 is the smallest number between 127, 131 and 59, then a(5) = 59.
    .  .  .  .  .
  —11-28-53-86-127—
  —12-29-54-87-128—
  —13-30-55-88-129—
  —32-31-56-89-130—
  —59-58-57-90-131—
    .  .  .  .  .
		

Crossrefs