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.
%I A347522 #18 Feb 16 2025 08:34:02 %S A347522 1,11,13,7,3,5,29,23,17,19,2,47,31,37,41,43,83,89,97,53,59,61,67,71, %T A347522 73,79,103,101,107,109,113,131,127,137,139,149,151,157,163,167,173, %U A347522 179,181,191,193,197,199,211,223,229,227,233,239,241,251,257,263,269,271,277,281,283,331,293,307,311 %N A347522 The prime numbers visited on a square spiral when starting at 1 and then stepping to the smallest unvisited prime number that is not visible from the current number. %C A347522 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 A347522 As n increases the vast majority of primes are on the same square ring of numbers as the current prime. However occasionally, especially for primes inside the right side quadrant, the next prime is on an outer or inner ring which causes the step to make a diagonal line. See the linked images. The largest diagonal step after 50000 terms is one at step 43936 between primes 532981 and 531457 which is seen as the long violet diagonal line from the top-left to the bottom-right in the image for these terms. No other such diagonal line is seen up to 10^6 terms. %H A347522 Scott R. Shannon, <a href="/A347522/a347522.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 white dots show the visited prime numbers. %H A347522 Scott R. Shannon, <a href="/A347522/a347522.jpg">Image showing the path taken when connecting the first 50000 terms</a>. %H A347522 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/VisiblePoint.html">Visible Point</a>. %H A347522 Wikipedia, <a href="https://en.wikipedia.org/wiki/Ulam_spiral">Ulam Spiral</a>. %e A347522 The square spiral is numbered as follows: %e A347522 . %e A347522 17--16--15--14--13 . %e A347522 | | . %e A347522 18 5---4---3 12 29 %e A347522 | | | | | %e A347522 19 6 1---2 11 28 %e A347522 | | | | %e A347522 20 7---8---9--10 27 %e A347522 | | %e A347522 21--22--23--24--25--26 %e A347522 . %e A347522 a(1) = 1. The central starting number. %e A347522 a(2) = 11 as the smaller prime numbers 2,3,5,7 are all visible from 1, while 11 is hidden by 2. %e A347522 a(3) = 13 as the smaller prime numbers 2,3,5,7 are all visible from 11, while 13 is hidden by 12. %e A347522 a(4) = 7 as the smaller prime numbers 2,3,5 are visible from 13, while 7 is hidden by 1 and 3. %e A347522 a(7) = 29 as the smaller prime numbers 2,17,19,23 are visible from 5, while 29 is hidden by 3,4 and 12. %Y A347522 Cf. A347358 (step to smallest visible), A000040, A063826, A214664, A214665, A331400, A335364, A332767, A330979. %K A347522 nonn %O A347522 1,2 %A A347522 _Scott R. Shannon_, Sep 05 2021