login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A194636 Least k >= 0 such that (2*n-1)*2^k - 1 or (2*n-1)*2^k + 1 is prime, or -1 if no such value exists. 13
0, 0, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 1, 1, 1, 1, 5, 3, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 3, 3, 1, 3, 6, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 2, 1, 1, 2, 5, 1, 3, 4, 1, 1, 1, 1, 2, 2, 1, 4, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,7

COMMENTS

Bisection of A194591: a(n) = A194591(2*n-1).

A194637 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[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

Cf. A194591, A194600, A194603, A194606, A194607, A194608, A194635, A194637, A194638, A194639.

Cf. A040081, A040076, A076335, A180247.

Sequence in context: A144477 A106345 A319395 * A286299 A081729 A219157

Adjacent sequences:  A194633 A194634 A194635 * A194637 A194638 A194639

KEYWORD

sign

AUTHOR

Arkadiusz Wesolowski, Aug 31 2011

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 16 15:10 EDT 2021. Contains 346065 sequences. (Running on oeis4.)