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”).

A104038
a(n) is the least k such that k*(k+1)*Mersenne-prime(n)+1 is prime.
0
1, 2, 3, 12, 8, 3, 5, 14, 17, 69, 189, 42, 392, 167, 377, 12, 2007, 434, 744, 705, 1089, 1109, 7833, 7328, 1271, 192, 6770, 2379
OFFSET
1,2
EXAMPLE
1*2*(2^2-1)+1 = 7 is prime, so a(1) = 1.
2*3*(2^3-1)+1 = 43 is prime, so a(2) = 2.
3*4*(2^5-1)+1 = 373 is prime, so a(3) = 3.
MATHEMATICA
f[p_] := Module[{k = 1}, While[! PrimeQ[k*(k + 1)*p + 1], k++]; k]; f /@ (2^MersennePrimeExponent[Range[15]] - 1) (* Amiram Eldar, Jul 18 2021 *)
CROSSREFS
Sequence in context: A282075 A282514 A320810 * A112979 A225723 A092972
KEYWORD
nonn,more
AUTHOR
Pierre CAMI, Mar 31 2005
EXTENSIONS
a(14) inserted and a(24)-a(28) added by Amiram Eldar, Jul 18 2021
STATUS
approved