login
A194606
Least k >= 0 such that prime(n)*2^k - 1 or prime(n)*2^k + 1 is prime, or -1 if no such value exists, where prime(n) denotes the n-th prime number.
13
0, 0, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 4, 1, 5, 3, 2, 2, 2, 1, 1, 1, 1, 3, 3, 3, 6, 1, 2, 1, 2, 1, 3, 4, 1, 2, 4, 1, 1, 3, 1, 2, 2, 1, 1, 3, 2, 1, 1, 1, 11, 1, 4, 2, 3, 1, 2, 1, 11, 1, 1, 9, 3, 6, 1, 1, 3, 3, 4, 1, 1, 2, 1, 2, 11, 4, 3, 2, 1, 4, 1, 2, 1, 1
OFFSET
1,6
COMMENTS
A194607 gives the record values.
LINKS
Arkadiusz Wesolowski, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Brier Number
EXAMPLE
For n=4, 7*2^0-1 and 7*2^0+1 are composite, but 7*2^1-1=13 is prime, so a(4)=1.
MATHEMATICA
Table[p = Prime[n]; k = 0; While[! PrimeQ[p*2^k - 1] && ! PrimeQ[p*2^k + 1], k++]; k, {n, 100}] (* Arkadiusz Wesolowski, Sep 04 2011 *)
KEYWORD
sign
AUTHOR
STATUS
approved