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.

A347358 The prime numbers visited on a square spiral when starting at 1 and then stepping to the smallest unvisited prime number that is visible from the current number.

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Aug 28 2021

Keywords

Comments

A number is visible from the current number if, given it has coordinates (x,y) relative to the current number, the greatest common divisor of |x| and |y| is 1. See A331400 for the points visible from the starting 1 number.
The primes visited in the sequence appear to oscillate between two different regimes. In one the vast majority of the next smallest visible primes are on the corners of the neighboring inner or outer square ring of numbers, thus the steps are nearly vertical or horizontal relative to the current square. In the other the majority of next smallest visible primes are on square rings much closer or further away from the origin than the current ring, or entirely on the other side of the spiral relative to the starting number. In this regime the path makes very random steps in many different diagonal directions, covering the entire spiral. See the three linked images.

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) = 1. The central starting number.
a(2) = 2, a(3) = 3 as 2 is the smallest visible unvisited prime from 1, and 3 is the smallest visible unvisited prime from 2.
a(4) = 11 as 11 is the smallest visible unvisited prime from 3. Note that from 3 the smaller unvisited primes 5 and 7 are hidden from 3 by the numbers 4 and 1.
a(7) = 29 as 29 is the smallest visible unvisited prime from 13. Note that from 13 the smaller unvisited primes 7, 17, 19, 23 are hidden from 13 by numbers 3, 14, 4, 2 respectively.
		

Crossrefs

Cf. A347522 (step to smallest hidden), A000040, A063826, A214664, A214665, A331400, A335364, A332767, A330979.