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
Chai Wah Wu, Table of n, a(n) for n = 0..3313
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
Robert G. Wilson v, Dec 03 2003
EXTENSIONS
a(29)-a(31) from Donovan Johnson, Sep 10 2013
STATUS
approved