login
A358922
First of four consecutive primes p,q,r,s such that q*s - p*r is a square.
1
5, 13, 137, 353, 877, 5171, 6337, 9397, 11197, 16631, 20011, 31247, 39191, 61261, 110581, 114067, 178537, 182981, 186601, 216317, 251917, 266797, 273349, 296477, 369791, 372707, 427681, 431567, 580787, 889337, 963331, 1009193, 1244053, 1501847, 1937657, 2212187, 2227801, 2347907, 2595311, 2909219
OFFSET
1,1
COMMENTS
If, for example, 3*x^2-11, 3*x^2-5, 3*x^2+5 and 3*x^2+11 are consecutive primes, then 3*x^2-11 is a term. According to the generalized Bunyakovsky conjecture there should be infinitely many such terms.
LINKS
EXAMPLE
a(3) = 137 is a term because it is the start of four consecutive primes 137, 139, 149, 151 with 139*151 - 137*149 = 576 = 24^2.
MAPLE
q:= 2: r:= 3: s:= 5:
R:= NULL: count:= 0:
while count < 50 do
p:= q; q:= r; r:= s; s:= nextprime(s);
if issqr(q*s-p*r) then count:= count+1; R:= R, p; fi
od:
R;
MATHEMATICA
Select[Partition[Prime[Range[220000]], 4, 1], IntegerQ[Sqrt[#[[2]]*#[[4]] - #[[1]]*#[[3]]]] &][[;; , 1]] (* Amiram Eldar, Dec 06 2022 *)
PROG
(Python)
from math import isqrt
from sympy import nextprime
from itertools import islice
def issquare(n): return isqrt(n)**2 == n
def agen(): # generator of terms
p, q, r, s = 2, 3, 5, 7
while True:
if issquare(q*s - p*r): yield p
p, q, r, s = q, r, s, nextprime(s)
print(list(islice(agen(), 40))) # Michael S. Branicky, Dec 08 2022
CROSSREFS
Sequence in context: A213129 A004063 A005764 * A305643 A316919 A099974
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Dec 06 2022
STATUS
approved