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!)
A249077 Primes of the form n^2 + k such that n^2 - k is also prime, where -n < k < n. 0
3, 5, 7, 11, 13, 19, 31, 41, 61, 67, 73, 79, 83, 89, 97, 103, 137, 139, 149, 151, 157, 181, 193, 199, 211, 223, 227, 239, 241, 271, 311, 317, 331, 337, 349, 373, 421, 433, 439, 443, 449, 461, 607, 619, 631, 643, 661, 691, 719, 739, 757, 811, 823, 829, 853, 859 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Members of a pair (a, b) of primes such that a < b and the distances from a and b to the nearest square above a (or below b) are equal.
The only prime of the form n^2 + 1 (A002496) in the sequence is 5.
Is this sequence infinite?
LINKS
FORMULA
A prime p is in the sequence if and only if 2*A053187(p)-p is prime.
EXAMPLE
2^2-1=3, 2^2+1=5, both prime.
8^2-3=61, 8^2+3=67, both prime.
MAPLE
g:= proc(t, m) if isprime(m+t) and isprime(m-t) then (m+t, m-t) else NULL fi end proc:
`union`(seq(map(g, {$1..n-1}, n^2), n=2..100));
# if using Maple 11 or earlier, uncomment the next line
# sort(convert(%, list));
# Robert Israel, Oct 31 2014
PROG
(Magma) lst:=[]; for m in [1..28] do r:=m*(m+1)+1; s:=(m+1)^2; for a in [r..s-1] do if IsPrime(a) then b:=2*s-a; if IsPrime(b) then Append(~lst, a); Append(~lst, b); end if; end if; end for; end for; Sort(lst);
(PARI) for(n=1, 859, if(issquare(n), x=ps=n; until(issquare(x), x++); ns=x); if(isprime(n), if(n-ps<ns-n, c=2*ps-n, c=2*ns-n); if(isprime(c), print1(n, ", "))));
CROSSREFS
Sequence in context: A040993 A078425 A020587 * A126960 A119753 A169969
KEYWORD
nonn
AUTHOR
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 April 19 03:57 EDT 2024. Contains 371782 sequences. (Running on oeis4.)