Cousin Primes

Author

Eric W. Weisstein
January 6, 2006

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PrimeNumbers/CousinPrimes.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/CousinPrimes.html.

©2006 Wolfram Research, Inc. except for portions noted otherwise

Initialization

Pairs

pairs={#,#+4}&/@Select[Prime[Range[100]],PrimeQ[#+4]&]

Large

(53238/385) (9771919142 ((((53238 Primorial(7879)))^2)-1)+2310) Primorial(7879)+1

Digits/@{p=(9771919142*((53238Primorial[7879])^2-1)+2310)*53238*Primorial[7879]/385+1,p+4}

PrimeQ[{p,p+4}]//Timing

630062 (2^37555)+3, 7

Digits/@{630062*2^37555+3,630062*2^37555+7}

PrimeQ[{630062*2^37555+3,630062*2^37555+7}]//Timing