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

Indices of Mersenne primes among primes of the form 24k + 7 (A107006).
7

%I #18 Sep 04 2023 16:36:20

%S 1,2,5,129,1536,5430,13138099

%N Indices of Mersenne primes among primes of the form 24k + 7 (A107006).

%C All Mersenne primes with the exception of the first one (3) are of the form 24*k + 7.

%C Sequence lists indices m where A139483(m) is a Mersenne prime.

%e 5 is in this sequence, because A107006(5) is a Mersenne prime.

%t w = {2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607}; Do[w[[n]] = 2^w[[n]] - 1, {n, 1, Length[w]}]; c = 0; a = {}; Do[k = 24 n + 7; If[PrimeQ[k], c = c + 1; If[MemberQ[w, k], AppendTo[a, c]]], {n, 1, 10000000}]; a

%t With[{mps=2^#-1&/@MersennePrimeExponent[Range[20]]},Position[ Select[ 24*Range[0,10^8]+7,PrimeQ],_?(MemberQ[mps,#]&)]]//Flatten (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Aug 20 2019 *)

%Y Cf. A107006, A124477, A139479, A139483.

%K nonn,hard,more

%O 2,2

%A _Artur Jasinski_, Apr 23 2008

%E Edited name and added example by _Dmitry Kamenetsky_, Jan 02 2011

%E a(8) from _Charles R Greathouse IV_, Mar 22 2011