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.

This page as a plain text file.
%I A242998 #33 Feb 16 2025 08:33:22
%S A242998 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,
%T A242998 0,0,0
%N 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.
%C A242998 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).
%C A242998 See A242025 for the resulting primes R, which however are there not listed in order of the p's.
%C A242998 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.
%H A242998 S. Kravitz, A search for large weird numbers. J. Recreational Math. 9(1976), 82-85 (1977). <a href="http://zbmath.org/?format=complete&amp;q=an:0365.10003">Zbl 0365.10003</a>
%H A242998 E. Weisstein, <a href="https://mathworld.wolfram.com/WeirdNumber.html">Weird numbers</a>, on MathWorld - a Wolfram web ressource.
%e A242998 For given p=A000043(n), the following k's yield a prime R:
%e A242998 p : k's (and resulting primes R, Q=2^p-1 and/or weird W=2^(k-1)*Q*R)
%e A242998 2 : -
%e A242998 3 : 2 (R=5, Q=7, W=70)
%e A242998 5 : 4 (R=29, Q=31, W=7192)
%e A242998 7 : 4 (R=17, Q=127, W=17272), 5 (R=41, Q=127, W=83312)
%e A242998 13 : 11 (R=2729, Q=8191, W=22889716736)
%e A242998 17 : 13 (R=8737, Q=131071, W=4690605371392)
%e A242998 19 : 16 (R=74897, W=1286718208049152), 17 (R=174761, W=6004730783793152)
%e A242998 31 : 16 (R=65537, W=2^15*(2^31-1)*R), 29 (R=715827881, W=2^28*(2^31-1)*R)
%e A242998 61 : 57 (R=153722867280912929, W=2^56*(2^61-1)*R)
%e A242998 89 : 78 (R=302379100949042568368129, W=2^77*(2^89-1)*R)
%e A242998 107 through 86243 : none.
%e A242998 107 through 3021377: none. _Robert Price_, Sep 05 2019
%e A242998 The present sequence lists the number of k's in each line.
%t A242998 A000043 = {2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607,
%t A242998    1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937,
%t A242998    21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433,
%t A242998    1257787, 1398269, 2976221, 3021377, 6972593, 13466917, 20996011,
%t A242998    24036583, 25964951, 30402457, 32582657, 37156667, 42643801,
%t A242998    43112609};
%t A242998 lst = {};
%t A242998 For[i = 1, i <= 28, i++,
%t A242998   p = A000043[[i]];
%t A242998   kc = 0;
%t A242998   For[k = 1, k < p, k++,
%t A242998    r = 2^k - 1 + (2^k - 2)/(2^(p - k) - 1);
%t A242998    If[! IntegerQ[r], Continue[]];
%t A242998    If[PrimeQ[r], kc++]];
%t A242998   AppendTo[lst, kc]];
%t A242998 lst (* _Robert Price_, Sep 05 2019 *)
%o A242998 (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)))}
%Y A242998 Cf. A258882 (PWN of the form 2^k*p*q), A000043 (Mersenne prime exponents), A000668.
%Y A242998 Cf. A242025 (the primes R).
%Y A242998 Row lengths of A242999 (values of p) and A243003 (values of k), cf. A242993 for the smallest possible k.
%Y A242998 See also A320875 for more general solutions to R = (MQ-1)/(Q-M) = prime.
%K A242998 nonn,hard,more
%O A242998 1,4
%A A242998 _M. F. Hasler_, Aug 17 2014
%E A242998 Typo in definition corrected by _Jens Kruse Andersen_, Aug 27 2014
%E A242998 a(29)-a(37) from _Robert Price_, Sep 05 2019