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 A332583 #31 Feb 16 2025 08:33:59 %S A332583 2,3,5,7,19,23,29,41,47,59,61,67,71,79,83,89,97,103,107,109,113,131, %T A332583 137,149,167,173,179,181,191,193,199,223,227,229,239,251,263,271,277, %U A332583 283,293,311,317,347,349,353,359,367,373,379,383,389,397,409,419,433,439,443,449,457,461,467,479,487,491,499,503 %N A332583 Label only the prime-numbered position cells of the infinite 2D square lattice with the square spiral (or Ulam spiral), starting with 1 at the center; sequence lists primes that are visible from square 1. %C A332583 Any grid point labeled with a prime number and with coordinates (x,y) relative to the central grid point, which is numbered 1, and where the greatest common divisor (gcd) of |x| and |y| equals 1 will be visible from the central point. Grid points where gcd(|x|,|y|) > 1 may have another prime grid point directly between it and the central point and will thus not be visible. %C A332583 For a square spiral of size 10001 by 10001, slightly over 100 million numbers, a total of 5762536 primes are present, of which 4811013 are visible. This gives a ratio of visible primes to all primes of about 0.835. %H A332583 Scott R. Shannon, <a href="/A332583/a332583.png">Image showing the visible primes from point 1 for the first 100000 grid points</a>. The primes visible from the central 1 square are shown in yellow while those blocked are shown in grey. The blocked primes also contain the number in parenthesis of the prime which blocks their visibility from the central square. Zoom into the image to see the grid point numbers. %H A332583 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/VisiblePoint.html">Visible Point</a>. %H A332583 Wikipedia, <a href="https://en.wikipedia.org/wiki/Ulam_spiral">Ulam Spiral</a>. %e A332583 The 2D grid is shown below. The primes that are blocked from the central 1 square are in parentheses; these all have another prime number directly between their position and the central square. %e A332583 . %e A332583 . %e A332583 -------------61-------59------+ %e A332583 | %e A332583 (37)---------------------(31) | %e A332583 | | | %e A332583 | (17)--------------(13) | | %e A332583 | | | | | %e A332583 | | 5--------3 | 29 | %e A332583 | | | | | | | %e A332583 | 19 | 1----2 (11) | (53) %e A332583 | | | | | | %e A332583 41 | 7------------+ | | %e A332583 | | | | %e A332583 | +-------23-----------+ | %e A332583 | | %e A332583 (43)-------------47-----------+ %e A332583 . %e A332583 . %e A332583 a(1) = 2 to a(4) = 7 are all primes adjacent to the central 1 point, thus all are visible from that square. %e A332583 a(5) = 19 as primes 11,13,17 are blocked from the central 1 point by points with prime numbers 2,3,5 respectively. %e A332583 a(14) = 79 as although the point 79 has relative coordinates of (2,-4) from the central square, gcd(|2|,|-4|) = 2, there is no other prime at coordinate (1,-2), thus it is visible. This square is not visible from the central square when nonprime points are also considered in the spiral. %Y A332583 Cf. A000040, A063826, A157426, A157428, A325604, A325606, A331400, A332582. %Y A332583 Cf. also A156859. %K A332583 nonn %O A332583 1,1 %A A332583 _Scott R. Shannon_, Feb 17 2020 %E A332583 Edited by _N. J. A. Sloane_, Feb 17 2020