Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #8 Mar 17 2015 02:15:28
%S 227,239,271,997,1021,1061,2243,2251,2311,2339,2347,3527,4153,4217,
%T 6311,6491,6551,6971,9059,9109,9133,9341,9397,12671,14549,16273,16369,
%U 16529,19507,20551,20611,20719,20899,20983,25301,25343,25621,25741,27893
%N Prime numbers occurring at integer Pythagorean distance (radius) from 1 in Ulam square prime-spiral. Primes on axes are excluded.
%C Note that prime numbers on an axis are automatically an integer distance from 1.
%e a(1) = 227, a prime number: distance from 1 off-axis = (6,8,10) triangle.
%o (PARI) { uc(n) = k = (sqrtint(4*n-3)-1)\2; d=n-1-k*(k+1); if(k%2, c=[(k+1)\2-min(d,k+1),(k+1)\2-max(d-k-1,0)], c=[-k\2+min(d,k+1),-k\2+max(d-k-1,0)] ); c }
%o forprime(p=2,10^5, t=uc(p); if( t[1]!=0 && t[2]!=0 && issquare(t[1]^2+t[2]^2), print1(p,", "))) \\ _Max Alekseyev_
%K nonn
%O 1,1
%A _Donald S. McDonald_, Jan 09 2003
%E More terms from _Max Alekseyev_, Jan 28 2012