|
|
A090587
|
|
Smallest prime with exactly n consecutive zeros in the longest run of zeros in its binary expansion.
|
|
2
|
|
|
3, 2, 19, 17, 67, 131, 641, 257, 2053, 10243, 4099, 12289, 40961, 32771, 65539, 65537, 262147, 786433, 4194319, 7340033, 23068673, 50331653, 67108879, 436207619, 167772161, 268435463, 268435459, 1073741831, 1073741827, 3221225473, 21474836483, 68719476767
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Except for 2, the first and last binary digits of a prime number are 1.
One may also define a sequence of the smallest prime with its longest run of zeros containing *at least* n zeros in the binary expansion: 2, 2, 17, 17, 67, 131, 257, 257, 2053, 4099,.... - R. J. Mathar, Sep 09 2013
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(0) = 3 since 3_d = 11_b. a(1) = 2 since 2_d = 10_b. a(3) = 17 since 17_d = 10001_b. a(6) = 641 since 641_d = 1010000001_b.
|
|
MATHEMATICA
|
a = Table[0, {30}]; NextPrim[n_] := Block[{k = n + 1}, While[ ! PrimeQ[k], k++ ]; k]; p = 2; Do[ m = Length[ Union[ DeleteCases[ Split[ IntegerDigits[p, 2]], 1, 2]][[ -1]]]; If[ a[[m + 1]] == 0, a[[m + 1]] = p]; p = NextPrim[p], {n, 1, 117000000}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|