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.

A172258 Primes p such that exactly one of the numbers 2p-3 and 2p+3 is prime.

Original entry on oeis.org

2, 3, 11, 19, 23, 29, 31, 37, 41, 47, 71, 73, 83, 89, 101, 107, 139, 173, 181, 191, 197, 199, 211, 227, 229, 233, 241, 251, 263, 269, 277, 307, 311, 317, 331, 337, 347, 349, 353, 373, 379, 383, 397, 409, 421, 431, 433, 439, 443, 457, 461, 463, 467, 503, 509
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 30 2010

Keywords

Examples

			a(1)=2 because 2*2-3=1 (nonprime) and 2*2+3=7 (prime);
a(2)=29 because 2*29-3=55 (nonprime) and 2*29+3=61 (prime).
		

Crossrefs

Programs

  • Maple
    a := proc (n): if isprime(n) = true and isprime(2*n-3) = true and isprime(2*n+3) = false then n elif isprime(n) = true and isprime(2*n-3) = false and isprime(2*n+3) = true then n else end if end proc: seq(a(n), n = 1 .. 700); # Emeric Deutsch, Feb 15 2010
  • Mathematica
    Select[Prime[Range[100]],Total[Boole[PrimeQ[2#+{3,-3}]]]==1&] (* Harvey P. Dale, Mar 27 2021 *)

Extensions

Definition edited by Emeric Deutsch, Feb 15 2010
Corrected and extended by Emeric Deutsch, Feb 15 2010