OFFSET
1,1
COMMENTS
Related to the search for 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 consider 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). [First R formula corrected by Jens Kruse Andersen, Aug 18 2014]
LINKS
S. Kravitz, A search for large weird numbers. J. Recreational Math. 9(1976), 82-85 (1977). Zbl 0365.10003
FORMULA
One must have p/2 < k < p and (p-k) | (k-1).
EXAMPLE
For given p=A000043(n), the following k's yield a prime R:
p : k's
2 : -
3 : 2
5 : 4
7 : 4, 5
13 : 11
17 : 13
19 : 16, 17
31 : 16, 29
61 : 57
89 : 78
107 through 86243 : none.
107 through 3021377: none. - Robert Price, Sep 04 2019
Thus the pairs (p,k) are (3,2), (5,4), (7,4), (7,5), (13,11), ... and the present sequence lists the second component of these pairs, the first components are listed in A242999.
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 <= 10, i++,
p = A000043[[i]];
For[k = 1, k < p, k++,
r = 2^k - 1 + (2^k - 2)/(2^(p - k) - 1);
If[! IntegerQ[r], Continue[]];
If[PrimeQ[r], AppendTo[lst, k]]]];
lst (* Robert Price, Sep 04 2019 *)
PROG
(PARI) forprime(p=1, , ispseudoprime(2^p-1)||next; for(k=p\2+1, p-1, (k-1)%(p-k)==0 && isprime(2^k-1+(2^k-2)/(2^(p-k)-1))&&print1(k", "))) \\ M. F. Hasler, Jul 19 2016
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
M. F. Hasler, Aug 17 2014
STATUS
approved