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!)
A249806 Smallest odd number k>1 such that k*2^prime(n)-1 is also prime. 1
3, 3, 7, 3, 3, 9, 7, 51, 13, 7, 15, 21, 15, 3, 31, 147, 45, 69, 43, 73, 15, 69, 91, 19, 51, 81, 3, 25, 9, 85, 103, 55, 169, 225, 109, 145, 15, 103, 615, 69, 259, 69, 63, 45, 285, 471, 9, 255, 169, 489, 69, 273, 427, 43, 391, 169, 201, 21 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
If prime(n) is a Mersenne prime exponent then 2^prime(n)-1 is a prime < k*2^prime(n)-1.
LINKS
MAPLE
3*2^2-1=11 prime so a(1)=3.
3*2^3-1=23 prime so a(2)=3.
3*2^5-1=95 composite, 5*2^5-1=159 composite, 7*2^5-1=223 prime so a(3)=7.
MATHEMATICA
a249806[n_Integer] := Catch[Module[{k}, For[k = 3, k < 10^5, k += 2, If[PrimeQ[k*2^Prime[n] - 1], Throw[k], 0]]]]; a249806 /@ Range[120] (* Michael De Vlieger, Nov 11 2014 *)
PROG
(PFGW & SCRIPT)
SCRIPT
DIM j, 0
DIM k
DIM n
DIMS t
OPENFILEOUT myf, a(n).txt
LABEL loop1
SET j, j+1
IF j>1000 THEN END
SET k, p(j)
SET n, 1
LABEL loop2
SET n, n+2
SETS t, %d, %d, %d\,; j; k; n
PRP n*2^k-1, t
IF ISPRP THEN GOTO a
GOTO loop2
LABEL a
WRITE myf, t
GOTO loop1
(PARI) s=[]; forprime(p=2, 500, k=3; q=2^p; while(!ispseudoprime(k*q-1), k+=2); s=concat(s, k)); s \\ Colin Barker, Nov 06 2014
CROSSREFS
Cf. A135434.
Sequence in context: A076560 A359048 A096915 * A249382 A317929 A285387
KEYWORD
nonn
AUTHOR
Pierre CAMI, Nov 06 2014
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 29 06:50 EDT 2024. Contains 372097 sequences. (Running on oeis4.)