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

 

Logo

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 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A254886 a(n) = least k>0 such that n-k^2 and n+k^2 are both primes. 0
0, 0, 0, 1, 0, 1, 2, 0, 2, 0, 0, 1, 0, 3, 2, 0, 0, 1, 0, 3, 4, 3, 0, 0, 0, 0, 2, 3, 0, 1, 0, 3, 2, 0, 0, 5, 0, 3, 0, 0, 0, 1, 6, 0, 4, 0, 6, 5, 0, 3, 0, 3, 6, 5, 0, 0, 2, 0, 0, 1, 0, 3, 2, 0, 6, 0, 6, 0, 0, 3, 0, 1, 6, 0, 2, 0, 6, 5, 0, 3, 0, 0, 0, 5, 0, 9, 4, 3, 0, 7, 0, 3, 2, 0, 6, 0, 0, 3, 0, 9, 0, 1, 6, 0, 2, 0, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,7

COMMENTS

If n is a square then a(n)=sqrt(n)-1 or 0.

Also if n is a square and a(n)=sqrt(n)-1 then sqrt(n) is a term in A178659.

First appearances of k for k=1..58 are at n = 4, 7, 14, 21, 36, 43, 90, 117, 86, 111, 210, 149, 768, 201, 236, 285, 468, 329, 366, 411, 446, 1137, 534, 647, 654, 807, 770, 885, 900, 911, 3090, 1665, 1192, 2415, 1296, 1313, 4212, 2163, 1600, 1671, 5448, 1769, 2040, 1941, 2054, 3207, 2214, 2333, 5340, 2601, 2792, 7725, 2814, 3095, 3054, 5913, 3442, 4377.

Among the first 10000 terms, the first missing values are 59, 79, 82, 83, 89, 91, 92, 94, 97, 98, 100.

LINKS

Table of n, a(n) for n=1..109.

PROG

(PARI) k=1; while(k^2<n, if(isprime(n-k^2)&&isprime(n+k^2), return(k)); k++); 0

vector(50, n, a(n)) \\ Derek Orr, Feb 11 2015

CROSSREFS

Cf. A068501, A082467, A178659.

Sequence in context: A343632 A067109 A237584 * A030219 A287345 A260675

Adjacent sequences: A254883 A254884 A254885 * A254887 A254888 A254889

KEYWORD

nonn

AUTHOR

Zak Seidov, Feb 10 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 1 03:09 EST 2022. Contains 358454 sequences. (Running on oeis4.)