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.

A242998 Number of integers k such that R = (2^k*Q - Q - 1)/(Q + 1 - 2^k) is a prime number, when Q = A000668(n) is the n-th Mersenne prime.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

M. F. Hasler, Aug 17 2014

Keywords

Comments

Related to the search of large primitive weird numbers: Kravitz has shown that 2^(k-1)*Q*R is a primitive weird number (cf. A002975) when Q > 2^k and R = (2^k*Q - Q - 1)/(Q + 1 - 2^k) both are prime. Here we count such primes for the special case where Q = 2^p - 1 is a Mersenne prime, p=A000043(n). For such Q one has R = 2^k - 1 + (2^k - 2)/(2^(p-k) - 1).
See A242025 for the resulting primes R, which however are there not listed in order of the p's.
This sequence gives the row lengths for the table A243003 whose rows hold the k-values leading to prime R, for a given Mersenne prime.

Examples

			For given p=A000043(n), the following k's yield a prime R:
p : k's (and resulting primes R, Q=2^p-1 and/or weird W=2^(k-1)*Q*R)
2 : -
3 : 2 (R=5, Q=7, W=70)
5 : 4 (R=29, Q=31, W=7192)
7 : 4 (R=17, Q=127, W=17272), 5 (R=41, Q=127, W=83312)
13 : 11 (R=2729, Q=8191, W=22889716736)
17 : 13 (R=8737, Q=131071, W=4690605371392)
19 : 16 (R=74897, W=1286718208049152), 17 (R=174761, W=6004730783793152)
31 : 16 (R=65537, W=2^15*(2^31-1)*R), 29 (R=715827881, W=2^28*(2^31-1)*R)
61 : 57 (R=153722867280912929, W=2^56*(2^61-1)*R)
89 : 78 (R=302379100949042568368129, W=2^77*(2^89-1)*R)
107 through 86243 : none.
107 through 3021377: none. _Robert Price_, Sep 05 2019
The present sequence lists the number of k's in each line.
		

Crossrefs

Cf. A258882 (PWN of the form 2^k*p*q), A000043 (Mersenne prime exponents), A000668.
Cf. A242025 (the primes R).
Row lengths of A242999 (values of p) and A243003 (values of k), cf. A242993 for the smallest possible k.
See also A320875 for more general solutions to R = (MQ-1)/(Q-M) = prime.

Programs

  • Mathematica
    A000043 = {2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607,
       1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937,
       21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433,
       1257787, 1398269, 2976221, 3021377, 6972593, 13466917, 20996011,
       24036583, 25964951, 30402457, 32582657, 37156667, 42643801,
       43112609};
    lst = {};
    For[i = 1, i <= 28, i++,
      p = A000043[[i]];
      kc = 0;
      For[k = 1, k < p, k++,
       r = 2^k - 1 + (2^k - 2)/(2^(p - k) - 1);
       If[! IntegerQ[r], Continue[]];
       If[PrimeQ[r], kc++]];
      AppendTo[lst, kc]];
    lst (* Robert Price, Sep 05 2019 *)
  • PARI
    A242998(n,p=A000043[n])={sum(k=p\2+1, p-1, Mod(2, 2^(p-k)-1)^k==2 && ispseudoprime(2^k-1+(2^k-2)/(2^(p-k)-1)))}

Extensions

Typo in definition corrected by Jens Kruse Andersen, Aug 27 2014
a(29)-a(37) from Robert Price, Sep 05 2019