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
KEYWORD
easy,fini,full,nonn
AUTHOR
Tomas Xordan, Feb 14 2007
STATUS
approved