login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A276121
Smallest odd integer k such that k*2^prime(n)-1 is a prime number.
1
1, 1, 1, 1, 3, 1, 1, 1, 13, 7, 1, 21, 15, 3, 31, 147, 45, 1, 43, 73, 15, 69, 91, 1, 51, 81, 3, 1, 9, 85, 1, 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, 159, 181, 103, 15, 339
OFFSET
1,5
COMMENTS
When k=1 the prime k*2^prime(n)-1 is a Mersenne prime.
FORMULA
a(n) = A126717(prime(n)). - Michel Marcus, Sep 07 2016
EXAMPLE
1*2^7-1 = 127 prime so a(4) = 1 as prime(4)=7.
1*2^11-1 = 2047 composite, 3*2^11-1 = 6143 prime so a(5) = 3 as prime(5)=11.
MATHEMATICA
Table[k = 1; While[! PrimeQ[k 2^Prime@ n - 1], k += 2]; k, {n, 63}] (* Michael De Vlieger, Aug 21 2016 *)
PROG
(PARI) a(n) = {my(k=1); while (!isprime(k*2^prime(n)-1), k+=2); k; } \\ Michel Marcus, Aug 21 2016
CROSSREFS
Sequence in context: A261959 A348988 A257565 * A262809 A331568 A010278
KEYWORD
nonn
AUTHOR
Pierre CAMI, Aug 21 2016
STATUS
approved