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.

A270361 Odd primes p for which there exists an odd prime q < p such that p*q - 1 is a square.

This page as a plain text file.
%I A270361 #38 Feb 25 2024 05:59:29
%S A270361 13,29,53,61,73,89,97,109,137,149,157,173,233,241,277,317,349,353,373,
%T A270361 389,397,409,433,461,521,541,569,593,617,641,653,661,673,701,709,733,
%U A270361 757,769,773,821,829,853,877,881,929,937
%N A270361 Odd primes p for which there exists an odd prime q < p such that p*q - 1 is a square.
%C A270361 Conjecture: For any odd prime p there is at most one odd prime q, with q < p, for which p*q-1 is square.
%C A270361 (Note: If p were not restricted to being prime, there could be multiple primes q which make p*q-1 a square, with increasing multiplicities for larger p. The upper limit on the multiplicity of solutions, for prime and nonprime p and q values, is given by A006278. Note, however that those limits allow for solutions where q=2, and therefore two solutions when p and q are prime.)
%C A270361 a(n) is a subsequence of the Pythagorean Primes (A002144), which are of the form 4k+1.
%C A270361 The density of a(n) values among the primes declines with increasing n. For example, a(n) is about 22% of the first 1000 primes, and drops to about 15% of "incremental" primes around prime(10000). The density continues to fall among even larger primes. Twice those percentages apply as a portion of A002144.
%C A270361 All values of q also belong to A002144. It appears the set of q values "intends to" fully comprise A002144. This is notable because p values comprise an increasingly sparse subsequence within A002144, and each p value has just one q value.
%C A270361 The ability to fully comprise A002144 with q values is further challenged by the fact that for any given q value (i.e., any term of A002144) multiple values of p > q can be found such that p*q-1 is square. Thus q values are "promiscuous", and apparently without bounds on the number of p values they can serve.
%C A270361 Contrast this with primes p and q such that p*q+1 is square. The result are the Twin Primes (A001359 and A006512), arranged in a simple one-to-one correspondence, with p = q+2.
%H A270361 Chai Wah Wu, <a href="/A270361/b270361.txt">Table of n, a(n) for n = 1..10471</a>
%e A270361 13 is in this sequence because 13*5 - 1 = 64, which is square, with 5 < 13.
%t A270361 result = {}; Do[p = Prime[i]; Do[q = Prime[j]; r = p*q - 1;
%t A270361   If[Mod[r, 8] == 1 || Mod[r, 8] == 0 || Mod[r, 8] == 4,
%t A270361    If[IntegerQ[Sqrt[r]], AppendTo[result, p]]], {j, 2, i - 1}],
%t A270361 {i, 3, 1000}]; result
%o A270361 (Python)
%o A270361 from gmpy2 import is_prime, is_square
%o A270361 for p in range(3, 10 ** 4, 2):
%o A270361     flag = 0
%o A270361     if is_prime(p):
%o A270361         for q in range(3, p, 2):
%o A270361             if is_square(p * q - 1) and is_prime(q):
%o A270361                 flag = 1
%o A270361                 break
%o A270361     if flag:
%o A270361         print(p, end=", ")
%o A270361 # _Soumil Mandal_, Apr 07 2016
%o A270361 (PARI) lista(nn) = {forprime(p=3, nn, ok = 0; forprime (q=3, p-1, if (issquare(p*q-1), ok = 1; break);); if (ok, print1(p, ", ")););} \\ _Michel Marcus_, Apr 06 2016
%Y A270361 Cf. A002144.
%K A270361 nonn
%O A270361 1,1
%A A270361 _Richard R. Forberg_, Mar 15 2016