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!)
A264097 Smallest odd number k divisible by 3 such that k*2^n-1 is a prime. 3
3, 3, 3, 3, 3, 15, 3, 3, 27, 45, 15, 3, 87, 9, 15, 9, 45, 15, 3, 51, 57, 9, 33, 69, 39, 57, 57, 21, 27, 45, 213, 15, 57, 147, 3, 33, 45, 21, 3, 63, 117, 15, 33, 3, 57, 165, 33, 213, 117, 69, 87, 21, 183, 147, 45, 3, 33, 51, 111, 45, 93, 69, 57, 9, 3, 99, 63 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
As N increases, (Sum_{n=1..N} a(n))/(Sum_{n=1..N} n) appears to tend to 2*log(2), as can be seen by plotting the first 31000 terms.
This observation is consistent with the prime number theorem as the probability that k*2^n-1 is prime where k is a multiple of 3 is 1/(2*(n*log(2)+log(k))) ~ 1/(2*n*log(2)).
LINKS
EXAMPLE
3*2^0-1=2 prime so a(0)=3.
3*2^1-1=5 prime so a(1)=3.
3*2^2-1=11 prime so a(2)=3.
3*2^3-1=23 prime so a(3)=3.
MATHEMATICA
Table[k = 3; While[! PrimeQ[k 2^n - 1], k += 6]; k, {n, 0, 68}] (* Michael De Vlieger, Nov 03 2015 *)
PROG
(PFGW & SCRIPT)
Command: pfgw64 -f -e500000 in.txt
in.txt SCRIPT FILE:
SCRIPT
DIM k
DIM n, 0
DIMS t
OPENFILEOUT myf, a(n).txt
LABEL loop1
SET n, n+1
SET k, -3
LABEL loop2
SET k, k+6
SETS t, %d, %d\,; n; k
PRP k*2^n-1, t
IF ISPRP THEN WRITE myf, t
IF ISPRP THEN GOTO loop1
GOTO loop2
(PARI) a(n) = {k = 3; while (!isprime(k*2^n-1), k += 6); k; } \\ Michel Marcus, Nov 03 2015
CROSSREFS
Sequence in context: A163469 A105121 A290658 * A177013 A092282 A263998
KEYWORD
nonn
AUTHOR
Pierre CAMI, Nov 03 2015
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 April 24 19:59 EDT 2024. Contains 371963 sequences. (Running on oeis4.)