login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A078765 Prime numbers occurring at integer Pythagorean distance (radius) from 1 in Ulam square prime-spiral. Primes on axes are excluded. 0

%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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)