Bitwin Chain

Author

Eric W. Weisstein
October 25, 2004

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

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

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

Numeration

Timing[twins=Plus@@@Select[Partition[Table[Prime[n],{n,100000}],2,1],-Subtract@@#==2&];]

bitwins=Intersection[twins/4,twins/2]

Select[Range[100000], PrimeQ[# - 1] && PrimeQ[# + 1] && PrimeQ[2 # - 1] && PrimeQ[2# + 1] &]

2%18

bitwins-1

Function[n,{{n-1,n+1},{2n-1,2n+1}}]/@bitwins//ColumnForm

Jobling

Do[
Print[{n,PrimeQ[337190719854678690 2^n-1],PrimeQ[337190719854678690 2^n+1]}//Timing],
{n,0,7}]