A094343 List of pairs of primes (p, q) with q - p = 4.
3, 7, 7, 11, 13, 17, 19, 23, 37, 41, 43, 47, 67, 71, 79, 83, 97, 101, 103, 107, 109, 113, 127, 131, 163, 167, 193, 197, 223, 227, 229, 233, 277, 281, 307, 311, 313, 317, 349, 353, 379, 383, 397, 401, 439, 443, 457, 461, 463, 467, 487, 491, 499, 503, 613, 617, 643
Offset: 1
Examples
The pairs are (3,7), (7,11), (13,17), etc.
Links
- Seiichi Manyama, Table of n, a(n) for n = 1..10000
- Eric Weisstein's World of Mathematics, Cousin Primes
Crossrefs
Programs
-
Mathematica
Flatten[{#,#+4}&/@Select[Prime[Range[200]],PrimeQ[#+4]&]] (* Harvey P. Dale, Apr 13 2011 *)
-
PARI
isok(n) = (isprime(n) && isprime(n+4)) || (isprime(n-4) && isprime(n)); \\ Michel Marcus, Aug 26 2013
Extensions
Description was corrupted up during editing; correct description restored Aug 21 2005.
a(3) = 7 added by Vincenzo Librandi, May 06 2016
Comments