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.

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.

This page as a plain text file.
%I A320875 #27 Dec 28 2019 01:20:31
%S A320875 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,
%T A320875 3573184,2097152,7354396,19436,4517888,672,0,174080,0,262146,1984,48,
%U A320875 0,4194296,79,30720,128,1825866,4188889,194396,27227248,0,16384,723,0,265227072,22771712,13982720,134217728,59885796,587144,19436,0,17179869152,8388608
%N 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.
%C A320875 It is easy to see that R can't be an integer unless M < Q < M^2 + M.
%C A320875 Nonzero terms yield primitive weird numbers (PWN) 2^(n-1)*Q*R, cf. A258882.
%C A320875 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.
%C A320875 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.
%C A320875 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
%H A320875 Daily Record, <a href="https://www.dailyrecordnews.com/members/cwu-students-find-longest-weird-number/article_bf00ba5a-5de3-11e3-9303-001a4bcf887a.html">CWU students find longest 'weird' number</a>, and also Yakima Herald, <a href="http://web.archive.org/http://www.yakimaherald.com:80/news/latestlocalnews/1725774-8/cwu-students-break-record-for-largest-weird-number">CWU math students calculate what no mathematician has before</a> (backup on web.archive.org, page no longer available), both from Dec. 5, 2013
%H A320875 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>
%e A320875 a(109) = 8436 yields a 62-digit prime R and a 127 digit PWN 2^108*Q*R.
%e A320875 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.)
%e A320875 a(391) = 16386 leads to a 231-digit prime R and a 466-digit PWN 2^390*Q*R.
%e A320875 a(409) = 12360 leads to a 242-digit prime R and a 488-digit PWN 2^408*Q*R.
%e A320875 a(421) = 1661 leads to a 250-digit prime R and a 504-digit PWN 2^420*Q*R.
%e A320875 a(430) = 10304 leads to a 255-digit prime R and a 514-digit PWN 2^429*Q*R.
%e A320875 a(441) = 36080 leads to a 261-digit prime R and a 526-digit PWN 2^440*Q*R.
%e A320875 a(505) = 20726 leads to a 300-digit prime R and a 604-digit PWN 2^504*Q*R.
%o A320875 (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.
%o A320875 (PARI) A320875(n,L=0)={my(M=2^n-1,S=M^2-1); forprime(Q=M+1,if(L,L,M<<n), S%(Q-M)==0 && ispseudoprime(M+S/(Q-M))&&return((Q-M)/2))} \\ Default limit L=M^2+M for exhaustive search, but it appears that if a solution exists, it occurs for Q < 2M, so L=2^(n+1) should also work.
%Y A320875 Cf. A258882, subsequence of A002975.
%Y A320875 Cf. A242025, A242993, A242998, A242999, A243003 (all related to the case Q = 2^p-1 in A000668, p in A000043).
%K A320875 nonn
%O A320875 1,3
%A A320875 _M. F. Hasler_, Nov 11 2018