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-6 of 6 results.

A243003 Pairs (p,k) such that p is in A000043 and R=2^k-1+(2^k-2)/(2^(p-k)-1) is prime: this sequence lists the k-values, see A242999 for the p-values. (Ordered by p, then k.)

Original entry on oeis.org

2, 4, 4, 5, 11, 13, 16, 17, 16, 29, 57, 78
Offset: 1

Views

Author

M. F. Hasler, Aug 17 2014

Keywords

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]
This sequence lists the k-values, see sequence A242999 for the p-values and A242998(n) for the number of possible k-values for given p = A000043(n) resp. Q = A000668(n).
This sequence can also be considered as a table whose n-th row holds the possible k-values for the n-th Mersenne prime Q = A000668(n); sequence A242998 gives the row lengths of the table (which are mostly 0).

Examples

			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.
		

Crossrefs

Cf. A258882 (PWN of the form 2^k*p*q).
Cf. A242993 (least k), A242998 (number of solution for given p in A000043), A242999 (values of p), A242025 list of all primes R.

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 <= 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 *)
  • 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

Formula

One must have p/2 < k < p and (p-k) | (k-1).

A258882 Primitive weird numbers of the form 2^k*p*q with k > 0 and where p < q are odd primes.

Original entry on oeis.org

70, 836, 7192, 7912, 9272, 10792, 17272, 73616, 83312, 113072, 519712, 539744, 555616, 682592, 786208, 1188256, 1229152, 1901728, 2081824, 2189024, 3963968, 4128448, 4145216, 4486208, 4559552, 4632896, 4960448, 5440192, 5568448, 6460864, 6621632, 7354304, 7470272, 8000704, 8134208
Offset: 1

Views

Author

Keywords

Comments

The number of terms < 10^n: 0, 1, 2, 5, 9, 15, 35, 61, 114, 204, 380, 696, 1703, 3548, 6726, 13137, ....
If 2^k*p*q is a weird number, it is necessarily primitive, and 2^(k+1) < p < 2^(k+2)-2 < q < 2^(2k+1).
No odd weird numbers are known and any even weird number must have at least 3 distinct prime factors, since all numbers of the form 2^k*p^m are deficient or pseudoperfect or perfect (iff m = 1 and p = 2^(k+1)-1 is a Mersenne prime). Sequence A258333 lists the number of terms in this sequence for given k. - M. F. Hasler, Jul 11 2016
Kravitz has shown that 2^k*p*q is a primitive weird number when the primes p and q satisfy p = (2^(k+1)*q-q-1)/(q+1-2^(k+1)). Many terms in this sequence are of this form, e.g., a(n) with n = 1, 2, 3, 4, 6, 7, 9, 10, 15, 23, 26, 38, 45, 75, 94, 144, 157, 187, 287, 327, 368, 370, 459, 607, 657, 658, .... Sequences A242025, A242998, ... are related to the special case where q is a Mersenne prime (A000668). - M. F. Hasler, Jul 12 2016
Weird numbers of the form 2^k*p*q are always primitive, so this condition could be omitted in the definition of this sequence. - M. F. Hasler, Jul 13 2016
About 35 years after Kravitz's work, the topic of weird numbers has regained interest after a CWU press release about students who used Kravitz's formula to find a large PWN of this form. See A242025 and A320875. - M. F. Hasler, Nov 20 2018

Examples

			a(1) = A002975(1) = 70 = 2*5*7.
a(2) = A002975(2) = 836 = 2^2*11*19.
A002975(3) = 4030 = 2*5*13*31 is not in this sequence since it is not of the required form.
The same is true for A002975(4) = 5830.
a(3) = A002975(5) = 7192 = 2^3*29*31, etc.
A002975(179) = 2319548096 = 2^6 * 137^2 * 1931 is the first term of A002975 with only two odd prime divisors, but not of the required form. - _M. F. Hasler_, Nov 20 2018
		

References

  • S. Kravitz, A search for large weird numbers. J. Recreational Math. 9 (1976), 82-85 (1977). Zbl 0365.10003

Crossrefs

Cf. A002975, A258401 (PWN not of this form), A258374, A258375, A258883, A258884, A258885.
Cf. A242025, A242993, A242998, A242999, A243003 (related to the subsequence with q = (2^k*p-p-1)/(p+1-2^k) and p a Mersenne prime in A000668).
Cf. A320875 (more general case of Karavitz' formula).

Programs

  • Mathematica
    (* copy the terms from A002975, assign them equal to 'lst' and then *) fQ[n_] := Block[{m = n}, While[ Mod[m, 2] == 0, m /= 2]; PrimeOmega@ m == 2]; Select[lst, fQ]
  • PARI
    select(t->factor(t)[, 2][^1]=[1, 1]~, A002975) \\ Assuming that A002975 is defined as set or vector. - M. F. Hasler, Jul 11 2016

Formula

Extensions

Edited by M. F. Hasler, Jul 11 2016, Nov 20 2018

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

A242025 Primes of the form R = 2^k-1+(2^k-2)/(2^(p-k)-1), where p are Mersenne prime exponents listed in A000043.

Original entry on oeis.org

5, 17, 29, 41, 2729, 8737, 65537, 74897, 174761, 715827881, 153722867280912929, 302379100949042568368129
Offset: 1

Views

Author

M. F. Hasler, Aug 17 2014

Keywords

Comments

Related to the search for large primitive weird numbers: Kravitz has shown that 2^(k-1)*Q*R is a primitive weird number when Q > 2^k and R = (2^k*Q-Q-1)/(Q+1-2^k) both are prime, cf. subset A258882 of A002975. Here we consider such primes for the special case of Mersenne primes Q = 2^p-1, p in A000043. For such Q one has R = 2^k-1+(2^k-2)/(2^(p-k)-1), which must be an integer and prime number.
See A242998 for the number of exponents k leading to primes R, for given Q = A000668(n) = 2^p-1, p = A000043(n). But there is no one-to-one correspondence since the primes R are here listed according to their size (cf. example). The pairs (k,p) are given in A242999 and A243003.
Kravitz used his formula in 1976 to find the 53-digit PWN corresponding to a(11), cf. examples. In 2013, students of CWU used the same idea to find the next term in the series, corresponding to a(12), see examples. They found still larger PWN of the same form with other primes Q, see A320875. This renewed the interest in weird numbers and motivated several recent papers, cf. A002975. - M. F. Hasler, Nov 10 2018

Examples

			For given p = A000043(n), the following k yield a prime R and an associated (primitive) weird number W = 2^(k-1)*(2^p-1)*R in A258882 c A002975 c A006037:
For p = 2, no k yields a prime R = 2^k-1+(2^k-2)/(2^(p-k)-1).
For p = 3, k = 2 yields R = 5 and the (smallest) weird number W = 70 = A006037(1).
For p = 5, k = 4 yields R = 29 = a(3) and W = 7192 = A258882(3).
For p = 7, k = 4 yields R = 17 = a(2) and W = 17272 = A258882(7),
       and k = 5 yields R = 41 = a(4) and W = 83312 = A258882(9).
For p = 13, k = 11 yields R = 2729 = a(5) and W = 22889716736 = A258882(288)
For p = 17, k = 13 yields R = 8737 = a(6) and W = 4690605371392 = A258882(1203).
For p = 19, k = 16 yields R = 74897 = a(8), W = 1286718208049152 = A258882(7154),
        and k = 17 yields R = 174761 = a(9), W = 6004730783793152 = A258882(11466).
For p = 31, k = 16 yields R = 65537 = a(7) (smaller than both R's for p = 19),
        and k = 29 yields R = 715827881 = a(10).
For p = 61, only k = 57 yields a prime R = 153722867280912929 = a(11).
For p = 89, only k = 78 yields a prime R = 302379100949042568368129 = a(12).
For p = 107 through p = 86243, no k yields a prime R.
For p = 107 through p = 3021377, no k yields a prime R. - _Robert Price_, Sep 04 2019
		

Crossrefs

Cf. A258882 (PWN of the form 2^k*p*q).
Cf. A242993, A242998, A242999 and A243003: related to PWN with a prime factor R as defined here, with Q = A000668(n) = 2^A000043(n)-1.
Cf. A320875 for a more general pattern leading to more and larger PWN.

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 <= Length[A000043], 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, r]]]];
    Union[lst] (* Robert Price, Sep 04 2019 *)

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

A320875 Least d > 0 such that both Q = M + 2d and R = M + (M^2-1)/(Q-M) are prime, where M = 2^n - 1 = A000225(n), or 0 if there is no such d.

Original entry on oeis.org

0, 1, 2, 1, 3, 8, 2, 0, 6, 4, 66, 16, 20, 0, 6, 1, 2720, 0, 32, 0, 164, 8, 0, 524288, 153, 3573184, 2097152, 7354396, 19436, 4517888, 672, 0, 174080, 0, 262146, 1984, 48, 0, 4194296, 79, 30720, 128, 1825866, 4188889, 194396, 27227248, 0, 16384, 723, 0, 265227072, 22771712, 13982720, 134217728, 59885796, 587144, 19436, 0, 17179869152, 8388608
Offset: 1

Views

Author

M. F. Hasler, Nov 11 2018

Keywords

Comments

It is easy to see that R can't be an integer unless M < Q < M^2 + M.
Nonzero terms yield primitive weird numbers (PWN) 2^(n-1)*Q*R, cf. A258882.
This idea was used by S. Kravitz in 1976 and 35 years later by students of CWU to find the largest known PWN, cf. links and A242025, A242993, A242998, A242999, A243003. The 226 digits mentioned in the news article correspond not to a PWN but to the prime R for a(381) = 5456. The corresponding prime Q = M(381) + 2*5456 is the 54th prime after M(381), and only the third one for which R is an integer. The 127 digit PWN they found earlier corresponds to a non-minimal solution d = 34008 for n = 109. (It is a matter of seconds to find many much larger solutions, see examples.) This news led to renewed interest in this topic and a series of recent research papers, see references in A258882 and A002975.
Sequences A242025, A242993, A242998, A242999, A243003 consider PWN of the form 2^(k-1)*Q*R(k,Q) where the prime Q is fixed to be a Mersenne prime A000668, and k is varied to find a prime R.
Zero terms do not mean that there aren't PWN of the form 2^(n-1)*p*q with M+1 = 2^n < p < 2M < q < M(M+1). For example, a(8) = 0, but there are A258333(8) = 53 weird numbers with such (p,q). However, the two primes never satisfy the relation (p-M)(q-M) = M^2-1 which is considered here for (Q,R). - M. F. Hasler, Nov 20 2018

Examples

			a(109) = 8436 yields a 62-digit prime R and a 127 digit PWN 2^108*Q*R.
a(381) = 5456 yields a 226-digit prime R and a 455 digit PWN 2^380*Q*R. (This and the preceding one are mentioned in the News articles, cf LINKS.)
a(391) = 16386 leads to a 231-digit prime R and a 466-digit PWN 2^390*Q*R.
a(409) = 12360 leads to a 242-digit prime R and a 488-digit PWN 2^408*Q*R.
a(421) = 1661 leads to a 250-digit prime R and a 504-digit PWN 2^420*Q*R.
a(430) = 10304 leads to a 255-digit prime R and a 514-digit PWN 2^429*Q*R.
a(441) = 36080 leads to a 261-digit prime R and a 526-digit PWN 2^440*Q*R.
a(505) = 20726 leads to a 300-digit prime R and a 604-digit PWN 2^504*Q*R.
		

Crossrefs

Cf. A258882, subsequence of A002975.
Cf. A242025, A242993, A242998, A242999, A243003 (all related to the case Q = 2^p-1 in A000668, p in A000043).

Programs

  • PARI
    a(n)={my(M=2^n-1,S=M^2-1); fordiv(S+!S,D, ispseudoprime(M+D)&& ispseudoprime(M+S/D)&& return(D/2))} \\ Much faster than the variant below, but requires increasingly more stack space (allocatemem()) for larger n.
    
  • PARI
    A320875(n,L=0)={my(M=2^n-1,S=M^2-1); forprime(Q=M+1,if(L,L,M<
    				
Showing 1-6 of 6 results.