login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A194591 Least k >= 0 such that n*2^k - 1 or n*2^k + 1 is prime, or -1 if no such value exists. 15

%I #35 Oct 18 2014 10:14:20

%S 0,0,0,0,1,0,1,0,1,0,1,0,2,0,1,0,2,0,1,0,1,0,1,0,2,1,1,0,1,0,1,0,1,1,

%T 1,0,1,0,1,0,1,0,2,0,1,0,4,0,1,1,1,0,1,0,1,1,1,0,5,0,3,0,1,1,1,0,2,0,

%U 1,0,2,0,2,0,1,1,2,0,1,0,1,0,1,0,4,1

%N Least k >= 0 such that n*2^k - 1 or n*2^k + 1 is prime, or -1 if no such value exists.

%C Fred Cohen and J. L. Selfridge showed that a(n) = -1 infinitely often.

%C a(n) = 0 iff n is in A045718.

%C A217892 and A194600 give indices and values of the records.

%D Fred Cohen and J. L. Selfridge, Not every number is the sum or difference of two prime powers, Math. Comput. 29 (1975), 79-81.

%H Arkadiusz Wesolowski, <a href="/A194591/b194591.txt">Table of n, a(n) for n = 1..1000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/BrierNumber.html">Brier Number</a>

%F If a(n)>0, then a(2n)=a(n)-1.

%e For n=7, 7*2^0-1 and 7*2^0+1 are composite, but 7*2^1-1=13 is prime, so a(7)=1.

%t Table[k = 0; While[! PrimeQ[n*2^k - 1] && ! PrimeQ[n*2^k + 1], k++]; k, {n, 100}] (* _T. D. Noe_, Aug 29 2011 *)

%Y Cf. A194600, A194603, A194606, A194607, A194608, A194635, A194636, A194637, A194638, A194639.

%Y Cf. A040081, A040076, A076335, A180247.

%K sign

%O 1,13

%A _Arkadiusz Wesolowski_, Aug 29 2011

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)