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.

A347518 The numbers visited on a square spiral when starting at 1 and then stepping to the smallest unvisited number that is not visible from the current number and where the number is removed from the spiral once visited.

Original entry on oeis.org

1, 11, 6, 14, 2, 16, 7, 9, 17, 13, 10, 20, 18, 3, 5, 12, 22, 24, 21, 25, 19, 33, 31, 26, 28, 30, 27, 35, 32, 36, 47, 39, 29, 37, 40, 42, 38, 43, 45, 48, 44, 49, 41, 52, 50, 53, 55, 51, 56, 66, 54, 63, 57, 59, 61, 4, 23, 15, 46, 34, 77, 73, 65, 58, 62, 90, 64, 106, 74, 76, 79, 75, 80, 82, 78, 95
Offset: 1

Views

Author

Scott R. Shannon, Sep 04 2021

Keywords

Comments

On the standard square spiral a number is not 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 greater than 1. For this sequence at least one other number must also exist on the line connecting these two numbers for them to be hidden from each other. Most visited primes are stepped over by subsequent terms. See the first linked image.
See A331400 for the points visible from the starting 1 number.

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 is the central starting number.
a(2) = 11 as the numbers 2..10 are all visible from 1, while 11 is hidden by 2. After stepping to 11 the number 1 is removed.
a(3) = 6 as the numbers 2..5 are all visible from 11, while 6 is hidden by 2. After stepping to 6 the number 11 is removed.
a(4) = 14 as the numbers 2..5,7..10,12,13 are all visible from 6, while 14 is hidden by 4. After stepping to 14 the number 6 is removed. This is the first term that differs from A347357 as here the number 1 has been removed thus 2 is visible from 6.
		

Crossrefs

Cf. A347357 (do not remove number after step), A063826, A214664, A214665, A331400, A330979, A332767.