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.

A347337 The prime numbers ordered by their distance from the origin of a square spiral which starts at 1. If two or more primes have the same distance from the origin the smaller prime appears first.

Original entry on oeis.org

2, 3, 5, 7, 11, 19, 23, 13, 17, 29, 41, 47, 53, 61, 31, 37, 43, 59, 67, 71, 79, 97, 107, 73, 83, 89, 103, 109, 113, 127, 139, 151, 163, 137, 149, 101, 191, 131, 167, 173, 179, 193, 233, 281, 251, 263, 283, 157, 181, 199, 223, 229, 269, 277, 317, 353, 313, 331, 337, 349, 197, 211, 227, 239
Offset: 1

Views

Author

Scott R. Shannon, Aug 27 2021

Keywords

Examples

			The square spiral is numbered as follows:
.
  17--16--15--14--13   .
   |               |   .
  18   5---4---3  12   29
   |   |       |   |   |
  19   6   1---2  11   28
   |   |           |   |
  20   7---8---9--10   27
   |                   |
  21--22--23--24--25--26
.
a(1) = 2 as this is the only prime a distance of 1 unit from the origin.
a(2) = 3, a(3) = 5, a(4) = 7. All of these primes are a distance of
sqrt(2) units from the origin, so they are listed with the smaller primes first.
a(6) = 19 as this is 2 units from the origin, the same as a(5) = 11. This is the first prime that appears out of natural order as both 13 and 17 are sqrt(8) units, which is greater than 2 units, from the origin.
		

Crossrefs