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!)
A152162 Least k(n)>=floor(n/2) such that 3*2^k(n)*(2^n-1)-1 or 3*2^k(n)*(2^n-1)+1 is prime (or both primes) 1
0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 7, 6, 16, 9, 9, 8, 9, 10, 9, 10, 10, 14, 15, 13, 15, 15, 16, 15, 24, 17, 17, 21, 23, 17, 18, 45, 26, 25, 22, 23, 24, 21, 36, 25, 34, 23, 40, 35, 32, 42, 25, 26, 30, 32, 33, 31, 33, 32, 31, 30 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
As n increases (sum k(n) for i=1 to n)/(sum n for i=1 to n) tends to log(2)
LINKS
EXAMPLE
3*2^0*(2^1-1)-1=2 prime so k(1)=0 3*2^1*(2^2-1)-1=17 prime as 19 so k(2)=1 3*2^1*(2^3-1)-1=41 prime as 43 so k(2)=1
MATHEMATICA
lk[n_]:=Module[{k=Floor[n/2], c=3(2^n-1)}, While[NoneTrue[2^k*c+{1, -1}, PrimeQ], k++]; k]; Array[lk, 60] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 01 2021 *)
CROSSREFS
Sequence in context: A060969 A367694 A358151 * A030699 A363959 A366387
KEYWORD
nonn
AUTHOR
Pierre CAMI, Nov 27 2008
STATUS
approved

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 March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)