Sierpinski Number of the Second Kind

Author

Eric W. Weisstein
January 25, 2008

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

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

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

Code

SierpinskiRieselIndex::usage="SierpinskiRieselIndex[k,r,{n1,n2}] gives the smallest value of n such that k 2^n+r is prime for n=n1,...n2."

SierpinskiRieselList::usage="SierpinskiRieselList[k,r,num,max] gives the first num values of n such that k 2^n+r is prime for n<=num."

SierpinskiRieselQ::usage="SierpinskiReiselQ[k,r,nmax] returns True if k 2^n+r is composite for n<=nmax."
(*Sierpinski and Riesel Number*)SierpinskiRieselIndex[n_Integer?OddQ,sign_,its_Integer:1000]:=SierpinskiRieselIndex[n,sign,{1,its}]

SierpinskiRieselIndex[n_Integer?OddQ,sign_,{from_,to_}]:=Module[{i=from-1},While[i++<to&&!PrimeQ[n 2^i+sign]];
i]

SierpinskiRieselList[n_Integer?OddQ,sign_,k_,to_:1000]:=Module[{l={-1},i=0},While[i++<k,AppendTo[l,SierpinskiRieselIndex[n,sign,{l[[-1]]+1,to}]]];
Drop[l,1]]

SierpinskiRieselQ[n_Integer?OddQ,sign_,its_:1000]:=(SierpinskiRieselIndex[n,sign,its]==its+1)
Null

Seventeen of Bust Open Candidates

l={10223,21181,22699,24737,33661,55459,67607};

Select[l,PrimeQ]

“Seventeen or Bust” Counterexamples

l={
{4847,3321063},
{5359 ,5054502},
{19249,13018586},
{27653 ,9167433},
{28433 ,7830457},
{33661,7031232},
{44131 ,995972},
{46157 ,698207},
{54767 ,1337287},
{65567 ,1013803},
{69109 ,1157446}
};

Do[
Print[{
i,
#1 HoldForm[2]^#2+1&@@l[[i]],
IntegerLength[num=(#1 2^#2+1)&@@l[[i]]],TimeConstrained[PrimeQ[num],1]//Timing
}],
{i,Length[l]}
]

Smallest Known

Composite for all n

PrimeQ/@Or@@Table[78557 2^n+1,{n,10^4}]//Timing

PrimeQ/@Or@@Table[78557 2^n+1,{n,10^5}]//Timing

Pegg's Gaussian Conjecture

PrimeQ[#,GaussianIntegers->True]&/@Or@@Table[(10+3I) 2^n+1,{n,10^4}]//Timing

PrimeQ[#,GaussianIntegers->True]&/@Or@@Table[(10+3I) 2^n+1,{n,10^5}]//Timing

PrimeQ[#,GaussianIntegers->True]&/@Or@@Table[(25+3I) 2^n+1,{n,10^4}]//Timing

PrimeQ[#,GaussianIntegers->True]&/@Or@@Table[(25+3I) 2^n+1,{n,10^5}]//Timing

PrimeQ[#,GaussianIntegers->True]&/@Or@@Table[(40+3I) 2^n+1,{n,10^4}]//Timing

PrimeQ[#,GaussianIntegers->True]&/@Or@@Table[(40+3I) 2^n+1,{n,10^5}]//Timing

Lists

SierpinskiRieselQ[78557,1]

Table[5 2^n+1,{n,10}]

Table[SierpinskiRieselIndex[n,1,2000],{n,1,101,2}]

Table[19 2^n+1,{n,10}]

PrimeQ[%]

s=Table[SierpinskiRieselIndex[n,1,2000],{n,1,251,2}];

s=Table[SierpinskiRieselIndex[n,1,2000],{n,1,1001,2}]

Position[%162,2001]

SierpinskiRieselIndex[2 192-1,1,{5001,6000}]

SierpinskiRieselIndex[2 192-1,1,{6001,7000}]

Table[(2 192-1)2^n+1,{n,1,3}]

PrimeQ[%]

PrimeQ[(2 192-1)2^6393+1]

2 192-1

s1=Table[SierpinskiRieselList[n,1,2,2000],{n,1,251,2}]