OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Zak Seidov)
FORMULA
EXAMPLE
The ninth prime is 23. We verify that 23 + 37 = 60 = 29 + 31. Hence 9 is in the sequence.
The tenth prime is 29. We see that 29 + 41 = 70 but 31 + 37 = 68, so 10 is not in the sequence.
MATHEMATICA
Select[Range@ 240, Prime[#] + Prime[# + 3] == Prime[# + 1] + Prime[# + 2] &] (* Michael De Vlieger, Oct 28 2015 *)
PROG
(PARI) isok(k) = prime(k+3)+prime(k) == prime(k+1)+prime(k+2); \\ Michel Marcus, Aug 20 2015
(PARI) is(n, p=prime(n))=my(q=nextprime(p+1), r=nextprime(q+1), s=nextprime(r+1)); p+s==q+r
n=0; forprime(p=2, 1e5, if(is(n++, p), print1(n", "))) \\ Charles R Greathouse IV, Oct 28 2015
(Magma) [n: n in [1..250] |(NthPrime(n)+NthPrime(n+3)) eq (NthPrime(n+1)+ NthPrime(n+2))]; // Vincenzo Librandi, Nov 04 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by Michel Marcus, Aug 20 2015
STATUS
approved