%I #20 Dec 13 2021 21:29:18
%S 1,11,6,2,14,9,3,5,7,10,4,8,12,18,20,17,13,15,19,21,23,25,22,16,24,26,
%T 28,30,27,29,31,33,35,32,34,36,44,46,37,39,41,38,40,42,51,53,47,43,45,
%U 48,50,52,54,56,66,68,59,55,57,60,58,49,65,61,63,67,69,71,62,64,74,76,70,72,83,85,73
%N 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.
%C 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.
%C See A331400 for the points visible from the starting 1 number.
%H Scott R. Shannon, <a href="/A347357/a347357.gif">Image showing the path taken when connecting the first 1000 terms</a>. The colors are graduated across the spectrum to show the relative step order. The path lines are drawn over the points representing the earlier visit numbers, showing most numbers are stepped over by subsequent terms. The central 1 number is shown as a larger yellow square.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/VisiblePoint.html">Visible Point</a>.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Ulam_spiral">Ulam Spiral</a>.
%e The square spiral is numbered as follows:
%e .
%e 17--16--15--14--13 .
%e | | .
%e 18 5---4---3 12 29
%e | | | | |
%e 19 6 1---2 11 28
%e | | | |
%e 20 7---8---9--10 27
%e | |
%e 21--22--23--24--25--26
%e .
%e a(1) = 1. The central starting number.
%e a(2) = 11 as the numbers 2..10 are all visible from 1, while 11 is hidden by 2.
%e a(3) = 6 as the numbers 2..5 are all visible from 11, while 6 is hidden by 1 and 2.
%e a(4) = 2 as 2 is the smallest unvisited number and from 6 it is hidden by 1.
%e a(5) = 14 as the unvisited numbers 3..5,7..10,12,13 are all visible from 2, while 14 is hidden by 3.
%e a(11) = 4 as 4 is the smallest unvisited number and from 10 it is hidden by 2. This is the first time a diagonal step is taken.
%e a(25) = 24 as 24 is the smallest unvisited number and from 16 it is hidden by 1. This is the first step that is not vertical, horizontal or along a 45-degree diagonal.
%Y Cf. A347518 (remove number after step), A063826, A214664, A214665, A331400, A330979, A332767.
%K nonn
%O 1,2
%A _Scott R. Shannon_, Aug 28 2021
|