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.

A242993 Least k such that R = (2^k*Q-Q-1)/(Q+1-2^k) is prime, where Q = A000668(n) is the n-th Mersenne prime, or 0 if no such k exists.

Original entry on oeis.org

0, 2, 4, 4, 11, 13, 16, 16, 57, 78, 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

Kravitz has shown that 2^(k-1)*Q*R is a primitive weird number (cf. A002975) when Q > 2^k =: M+1 and R = (M*Q-1)/(Q-M) = M + (M^2-1)/(Q-M) both are prime. R cannot be an integer unless Q < M(M+1) which yields k > p/2 for Mersenne primes Q = 2^p-1. [Edited by M. F. Hasler, Nov 11 2018]
Sequence A242025 lists all primes R obtained in that way. Sequence A242998 gives the number of (k,R) for each Q in A000668. Sequence A242998 lists the primes p which give rise to a solution, with multiplicity, and A243003 lists the corresponding values of k. See the "main entry" A242025 for more information. - M. F. Hasler, Nov 11 2018

Examples

			For n = 2, Q = A000668(2) = 7, k = 2 yields the prime R = (2^k*Q-Q-1)/(Q+1-2^k) = 20/4 = 5 and the (smallest possible) weird number 2^(k-1)*Q*R = 2*7*5 = 70.
For n = 9, Q = A000668(9) = 2^61-1, k = 57 yields the prime R = 2^57-1 + (2^57-2)/(2^4-1) and the 53-digit primitive weird number 2^56*Q*R = 25541592347764814106588251084767772206406532903993344.
For n = 10, Q = A000668(10) = 2^89-1, k = 78 yields the prime R = 2^78-1 + (2^78-2)/(2^11-1) and the 74-digit primitive weird number 2^77*Q*R = 28283363272427014026275183563912621451964887156507346985599492888375328768.
		

Crossrefs

Cf. A242025 (primes R obtained in that way), A242998 (number of such k values for given n), A242999 (p=A000043(n) listed A242998(n) times), A243003 (all values of k).
Cf. A258882 (weird numbers of the form 2^k*p*q).

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 <= 25, 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 = k; Break[]]];
      AppendTo[lst, kc]];
    lst (* Robert Price, Sep 05 2019 *)
  • PARI
    a(n)={p=A000043[n]; for(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)) && return(k))}

Extensions

Definition corrected by Jens Kruse Andersen, Aug 18 2014
a(28)-a(37) from Robert Price, Sep 05 2019