login
Numbers of the form p+q-r = q+r-s where p < q < r < s are consecutive primes.
1

%I #64 Sep 21 2022 16:46:07

%S 1,13,37,65,223,343,637,1087,1273,1423,1445,1483,1603,1687,1867,2077,

%T 2135,2375,2605,2683,2705,3029,3523,3545,3913,3997,4123,4633,4783,

%U 4927,5435,5735,6079,7205,7295,7331,7547,7589,7811,8159,8227,8701,8827,9085,9335,9457,9461,9923,10057

%N Numbers of the form p+q-r = q+r-s where p < q < r < s are consecutive primes.

%C The consecutive primes (p,q,r,s) satisfy 2*(r-p) = s-p. Define (p,q,r,s) = (p,p+dq,p+dr,p+ds), then 2*dr = ds. For n > 1, (r-p) == 0 (mod 6). - _A.H.M. Smeets_, Aug 17 2019

%C Correspond to where prime(i) - (prime(i+2)-prime(i+1)) values repeat. For example, 13 is obtained via both 19 - (29-23) and 17 - (23-19). - _Bill McEachen_, Jan 03 2021

%H Harvey P. Dale, <a href="/A309720/b309720.txt">Table of n, a(n) for n = 1..1000</a>

%e Consider 4 consecutive primes (3,5,7,11), 3+5-7 = 1 = 5+7-11. 1 is a member of the sequence.

%e Consider 4 consecutive primes (59,61,67,71), 59+61-67 = 53 but, 61+67-71 = 57. These two sums are not equal so neither number is part of the sequence.

%t upto[n_]:=Block[{p,q,r,s,t,v}, Union[ Reap[ Do[ {p,q,r,s}=t; v=p+q-r; If[ v==q+r-s <= n, Sow@ v], {t, Partition[ Prime[ Range[ 4+ PrimePi[ 2*n] ]], 4,1]}]] [[2,1]]]]; upto[11000] (* _Giovanni Resta_, Sep 06 2019 *)

%t #[[1]]+#[[2]]-#[[3]]&/@Select[Partition[Prime[Range[2000]],4,1],#[[1]]+#[[2]]- #[[3]] == #[[2]]+#[[3]]-#[[4]]&] (* _Harvey P. Dale_, Sep 21 2022 *)

%Y Cf. A096379, A138042.

%Y Cf. A066495.

%K nonn

%O 1,2

%A _Philip Mizzi_, Aug 14 2019

%E More terms from _Michel Marcus_, Aug 14 2019