login

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”).

A126692
Prime numbers p such that 1000-p is also a prime. All terms are shown.
1
3, 17, 23, 29, 47, 53, 59, 71, 89, 113, 137, 173, 179, 191, 227, 239, 257, 281, 317, 347, 353, 359, 383, 401, 431, 443, 479, 491, 509, 521, 557, 569, 599, 617, 641, 647, 653, 683, 719, 743, 761, 773, 809, 821, 827, 863, 887, 911, 929, 941, 947, 953, 971, 977, 983, 997
OFFSET
1,1
COMMENTS
Suggested by the Goldbach Conjecture.
FORMULA
p1 + p2 = 1000 where p1 and p2 are prime numbers.
EXAMPLE
3 + 997 = 17 + 983 = 23 + 977 = 29 + 971 = 47 + 953 = 53 + 947 = 59 + 941 = 71 + 929 = 89 + 911 = 113 + 887 = 137 + 863 = 173 + 827 = 179 + 821 = 191 + 809 = 227 + 773 = 239 + 761 = 257 + 743 = 281 + 719 = 317 + 683 = 347 + 653 = 353 + 647 = 359 + 641 = 383 + 617 = 401 + 599 = 431 + 569 = 443 + 557 = 479 + 521 = 491 + 509 = 1000.
MAPLE
a:= proc(n) if isprime(n) and isprime(1000-n) then n fi end: seq(a(n), n=1..1000); # Emeric Deutsch, Feb 16 2007
MATHEMATICA
Select[Prime[Range[PrimePi[1000]]], PrimeQ[1000-#]&] (* Harvey P. Dale, Nov 28 2011 *)
Flatten[Select[IntegerPartitions[1000, {2}], AllTrue[#, PrimeQ]&]]//Sort (* Harvey P. Dale, Jul 30 2023 *)
PROG
(Python)
from sympy import isprime, primerange
print(sorted(p for p in primerange(1, 1000) if isprime(1000-p))) # Michael S. Branicky, Mar 17 2021
CROSSREFS
Cf. A126691.
Sequence in context: A019369 A019380 A296937 * A057173 A109371 A272176
KEYWORD
easy,fini,full,nonn
AUTHOR
Tomas Xordan, Feb 14 2007
STATUS
approved