cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A073715 Prime preceding the n-th Mersenne prime.

Original entry on oeis.org

2, 5, 29, 113, 8179, 131063, 524269, 2147483629, 2305843009213693921, 618970019642690137449562091, 162259276829213363391578010287957, 170141183460469231731687303715884105703
Offset: 1

Views

Author

Labos Elemer, Aug 05 2002

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> prevprime(numtheory[mersenne]([n])):
    seq(a(n), n=1..12);  # Alois P. Heinz, Oct 30 2024
  • Mathematica
    NextPrime[Select[2^Prime[Range[50]] - 1, PrimeQ], -1] (* Jayanta Basu, Jul 08 2013 *)
    Table[NextPrime[2^MersennePrimeExponent[n] - 1, -1], {n, 1, 12}] (* Amiram Eldar, Aug 10 2024 *)

Formula

a(n) = prime(primepi(A000668(n))-1).
From Amiram Eldar, Aug 10 2024: (Start)
a(n) = A151799(A000668(n)).
a(n) = A000668(n) - A365161(n). (End)

A365160 Least k such that A000668(n) + k is prime, where A000668(n) is the n-th Mersenne prime.

Original entry on oeis.org

2, 4, 6, 4, 18, 30, 22, 12, 16, 30, 40, 30, 888, 486, 2056, 696, 310, 718, 4692, 1600, 2788, 4290, 4326, 4150, 18088, 22096, 16342, 72816, 181720, 4200, 58416
Offset: 1

Views

Author

Robert P. P. McKone, Aug 24 2023

Keywords

Comments

The distance between the n-th Mersenne prime and the next prime.

Examples

			A000668(6) = 131071, the next prime is 131101, so a(6) = 131101 - 131071 = 30.
		

Crossrefs

Cf. A000040, A000668 (Mersenne primes), A001223, A059305, A074626, A365161.

Programs

  • Mathematica
    m[n_] := m[n] = (2^MersennePrimeExponent[n] - 1); a[k_, n_] := a[k, n] = m[n] + k; l[k_, n_] := l[k, n] = PrimeQ[a[k, n]]; Table[k = 1; Monitor[Parallelize[While[True, If[l[k, n], Break[]]; k++]; k], {n, k}], {n, 1, 20}]

Formula

a(n) = A001223(A059305(n)). - Michel Marcus, Aug 25 2023
a(n) = A074626(n) - A000668(n). - Amiram Eldar, Aug 10 2024

Extensions

a(28) from Michael S. Branicky, Aug 11 2024
a(29) from Minfeng Wang, Oct 29 2024
a(30)-a(31) from Minfeng Wang, Oct 29 2024
Showing 1-2 of 2 results.