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 A347337 #7 Sep 18 2021 16:46:53 %S A347337 2,3,5,7,11,19,23,13,17,29,41,47,53,61,31,37,43,59,67,71,79,97,107,73, %T A347337 83,89,103,109,113,127,139,151,163,137,149,101,191,131,167,173,179, %U A347337 193,233,281,251,263,283,157,181,199,223,229,269,277,317,353,313,331,337,349,197,211,227,239 %N 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. %e A347337 The square spiral is numbered as follows: %e A347337 . %e A347337 17--16--15--14--13 . %e A347337 | | . %e A347337 18 5---4---3 12 29 %e A347337 | | | | | %e A347337 19 6 1---2 11 28 %e A347337 | | | | %e A347337 20 7---8---9--10 27 %e A347337 | | %e A347337 21--22--23--24--25--26 %e A347337 . %e A347337 a(1) = 2 as this is the only prime a distance of 1 unit from the origin. %e A347337 a(2) = 3, a(3) = 5, a(4) = 7. All of these primes are a distance of %e A347337 sqrt(2) units from the origin, so they are listed with the smaller primes first. %e A347337 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. %Y A347337 Cf. A000040, A063826, A214664, A214665, A136626, A115258, A331027. %K A347337 nonn %O A347337 1,1 %A A347337 _Scott R. Shannon_, Aug 27 2021