cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A126692 Prime numbers p such that 1000-p is also a prime. All terms are shown.

Original entry on oeis.org

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

Views

Author

Tomas Xordan, Feb 14 2007

Keywords

Comments

Suggested by the Goldbach Conjecture.

Examples

			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.
		

Crossrefs

Cf. A126691.

Programs

  • 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 *)
  • 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

Formula

p1 + p2 = 1000 where p1 and p2 are prime numbers.