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 A383596 #16 Aug 06 2025 16:51:52 %S A383596 71,95,353,701,767,1151,1451,1961,2507,3347,4691,5957,7205,9671,13463, %T A383596 15635,21017,26051,27947,28985,34337,42017,49565,50921,52253,52349, %U A383596 55859,57191,63143,75857,79907,80831,81611,92339,101633,102557,106529,110495,114521,116513,121469,131075,136757,137879,144497 %N A383596 Integers in Ulam's spiral for which the numbers around them form a square whose four corners are all prime numbers. %C A383596 With the exception of the number 12, all numbers in Ulam's spiral are surrounded by at most 4 prime numbers. This sequence contains those k such that k together with the 8 surrounding numbers form a square whose 4 corners are prime numbers. That is, this sequence is formed by odd numbers k>1 such that A136626(k) = 4. %e A383596 71 is in this sequence, since the numbers around 71 in Ulam's spiral are 41, 42, 43, 70, 72, 107, 108 and 109, where the prime numbers 107, 109, 43 and 41 are the vertices of a square whose center is 71. %e A383596 . . . %e A383596 - 109 - 72 - 43 - %e A383596 - 108 - 71 - 42 - %e A383596 - 107 - 70 - 41 - %e A383596 . . . %o A383596 (Python) %o A383596 from sympy import isprime %o A383596 def ulam(x, y): %o A383596 k = max(abs(x), abs(y)) %o A383596 return (2*k) ** 2 + 1 + (-1 if x > -y else 1) * (2*k + x - y) %o A383596 def is_A383596(n): %o A383596 x = A174344(n) %o A383596 y = A274923(n) %o A383596 return all(isprime(ulam(x + i, y + j)) for i in (-1, 1) for j in (-1, 1)) # _David Radcliffe_, Aug 04 2025 %Y A383596 Cf. A063826, A136626, A383595. %K A383596 nonn %O A383596 1,1 %A A383596 _Gonzalo MartÃnez_, May 01 2025 %E A383596 a(45) corrected by _David Radcliffe_, Aug 04 2025