OFFSET
1,7
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[n = 2*n - 1; k = 0; While[! PrimeQ[n*2^k - 1] && ! PrimeQ[n*2^k + 1], k++]; k, {n, 100}] (* Arkadiusz Wesolowski, Sep 04 2011 *)
p[n_]:=Module[{c=2n-1, k=0}, While[!Or@@PrimeQ[c*2^k+{1, -1}], k++]; k]; Array[ p, 90] (* Harvey P. Dale, Mar 08 2013 *)
CROSSREFS
KEYWORD
sign
AUTHOR
Arkadiusz Wesolowski, Aug 31 2011
STATUS
approved