[go: up one dir, main page]

login
Prime preceding the n-th Mersenne prime.
4

%I #16 Oct 30 2024 21:59:07

%S 2,5,29,113,8179,131063,524269,2147483629,2305843009213693921,

%T 618970019642690137449562091,162259276829213363391578010287957,

%U 170141183460469231731687303715884105703

%N Prime preceding the n-th Mersenne prime.

%H Amiram Eldar, <a href="/A073715/b073715.txt">Table of n, a(n) for n = 1..18</a>

%F a(n) = prime(primepi(A000668(n))-1).

%F From _Amiram Eldar_, Aug 10 2024: (Start)

%F a(n) = A151799(A000668(n)).

%F a(n) = A000668(n) - A365161(n). (End)

%p a:= n-> prevprime(numtheory[mersenne]([n])):

%p seq(a(n), n=1..12); # _Alois P. Heinz_, Oct 30 2024

%t NextPrime[Select[2^Prime[Range[50]] - 1, PrimeQ], -1] (* _Jayanta Basu_, Jul 08 2013 *)

%t Table[NextPrime[2^MersennePrimeExponent[n] - 1, -1], {n, 1, 12}] (* _Amiram Eldar_, Aug 10 2024 *)

%Y Cf. A000668, A074626, A151799, A365161.

%K nonn,hard,changed

%O 1,1

%A _Labos Elemer_, Aug 05 2002