login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A354284
The first of four consecutive primes p1, p2, p3, p4 such that (p4-p3)*(p2-p1) = (p3-p2)^2.
1
89, 251, 449, 1061, 1439, 1741, 1997, 2237, 2239, 2267, 2593, 2657, 2699, 3301, 3433, 3449, 5101, 5189, 5237, 5381, 6197, 6311, 6361, 6599, 6827, 6829, 6883, 7433, 8087, 8171, 8311, 9067, 10259, 12149, 12611, 12641, 13451, 14741, 15791, 15901, 16787, 17027, 17291, 17387, 17389, 17471, 18211
OFFSET
1,1
LINKS
EXAMPLE
a(3) = 449 is a term because the four consecutive primes starting with 449 are 449, 457, 461, 463, and (463-461)*(457-449) = (461-457)^2 = 16.
MAPLE
P:= select(isprime, [seq(i, i=3..20000, 2)]):
R:= select(t -> (P[t+3]-P[t+2])*(P[t+1]-P[t]) = (P[t+2]-P[t+1])^2, [$1..nops(P)-3]):
P[R];
MATHEMATICA
Select[Partition[Prime[Range[2000]], 4, 1], (#[[4]] - #[[3]])*(#[[2]] - #[[1]]) == (#[[3]] - #[[2]])^2 &][[;; , 1]] (* Amiram Eldar, May 23 2022 *)
PROG
(Python)
from sympy import nextprime
from itertools import islice
def agen(): # generator of terms
p1, p2, p3, p4 = 2, 3, 5, 7
while True:
if (p4-p3)*(p2-p1) == (p3-p2)**2: yield p1
p1, p2, p3, p4 = p2, p3, p4, nextprime(p4)
print(list(islice(agen(), 47))) # Michael S. Branicky, May 22 2022
CROSSREFS
Sequence in context: A248745 A033257 A145821 * A142655 A140040 A008900
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, May 22 2022
STATUS
approved