The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A260869 Least k > 0 such that k^2 + (prime(n)-k)^2 is a prime, or 0 if no such k exists. 2
 1, 1, 1, 2, 1, 3, 1, 1, 2, 1, 3, 1, 1, 2, 5, 4, 2, 1, 2, 1, 3, 4, 2, 2, 5, 4, 1, 1, 2, 3, 5, 3, 1, 2, 6, 3, 1, 5, 4, 5, 4, 1, 2, 2, 1, 4, 1, 2, 2, 3, 3, 2, 5, 7, 1, 3, 3, 1, 2, 1, 4, 1, 1, 4, 1, 4, 1, 2, 2, 5, 3, 3, 1, 2, 1, 5, 4, 1, 5, 1, 3, 2, 10, 2, 1, 3, 6, 1, 2, 1, 4, 1, 5, 10, 3, 3, 2, 10, 7 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,4 COMMENTS It appears that any prime (and also any odd number > 1, see A260870) can be written as the sum of two positive integers such that the sum of their squares is prime. For an even number > 2 this is obviously not possible since k and 2n-k have the same parity and therefore the sum of their squares is even. LINKS PROG (PARI) A260869(n)=for(k=1, (n=prime(n))\2, isprime(k^2+(n-k)^2)&&return(k)) CROSSREFS Sequence in context: A058564 A226006 A210943 * A260870 A282497 A087157 Adjacent sequences:  A260866 A260867 A260868 * A260870 A260871 A260872 KEYWORD nonn AUTHOR M. F. Hasler, Aug 09 2015 STATUS approved

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

Last modified February 22 08:33 EST 2020. Contains 332130 sequences. (Running on oeis4.)