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 A172979 #31 Jun 12 2025 18:31:57 %S A172979 2,3,5,7,13,17,31,37,43,73,101,157,197,211,241,257,307,401,421,463, %T A172979 577,601,677,757,1123,1297,1483,1601,1723,2551,2917,2971,3137,3307, %U A172979 3541,3907,4357,4423,4831,5113,5477,5701,6007,6163,6481,7057,8011,8101,8191,8837,9901 %N A172979 Primes with locations of right angle turns in Ulam square spiral (primes in A033638). %C A172979 Except for the first term, 2, these are the primes on the main diagonals of the Ulam spiral. - _Robert G. Wilson v_, Jul 10 2014 %C A172979 Primes p for which floor(sqrt(p)) | (p-1). - _Davide Rotondo_, Jun 06 2025 %e A172979 Ulam square spiral = 7 8 9 / 6 1 2 / 5 4 3 /...; changes of direction (right-angle) %e A172979 for the primes at 2 3 5 7 ... %p A172979 with(numtheory): a0:=1:for n from 1 to 200 do : a1:=a0+floor(n/2):a0:=a1:if %p A172979 type(a1,prime)=true then printf(`%d, `,a1):else fi:od: %t A172979 Select[ Sort@ Flatten@ Table[ 4n^2 + (2j - 4)n + 1, {j, 0, 3}, {n, 55}], PrimeQ] %o A172979 (PARI) for(n=0,10^3, my(t=n^2\4+1); if(isprime(t),print1(t,", "))); \\ _Joerg Arndt_, Jul 12 2014 %Y A172979 Cf. A033638, A054554, A053755, A054569, A016754, A078784. %K A172979 nonn %O A172979 1,1 %A A172979 _Michel Lagneau_, Nov 21 2010