A235743 Primes p(k) such that p(k) + p(k+3) = p(k+1) + p(k+2) + 4.
17, 41, 79, 131, 149, 173, 227, 233, 239, 347, 349, 379, 439, 463, 521, 599, 641, 673, 677, 983, 1013, 1091, 1231, 1277, 1427, 1429, 1453, 1487, 1549, 1607, 1811, 1949, 2099, 2203, 2309, 2579, 2609, 2687, 2689, 2833, 2857, 2903, 2909, 2917, 3083, 3167, 3299
Offset: 1
Keywords
Examples
17 is in the sequence since 17, 19, 23, and 29 are four consecutive primes and it holds 17 + 29 = 19 + 23 + 4.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A022885.
Programs
-
Mathematica
f[{a_,b_,c_,d_}]:= a-b-c+d; First /@ Select[Partition[Prime@ Range@ 500, 4, 1], f@# == 4 &] (* Giovanni Resta, Jan 16 2014 *) Transpose[Select[Partition[Prime[Range[5000]], 4, 1], First[#] + Last[#]==#[[2]] + #[[3]] + 4&]][[1]] (* Vincenzo Librandi, Feb 02 2014 *)
-
PARI
isok(p) = { my(k = primepi(p)); (p == prime(k)) && ((prime(k) + prime(k+3)) == (prime(k+1) + prime(k+2) + 4));} \\ Michel Marcus, Jan 15 2014
Extensions
More terms from Michel Marcus, Jan 15 2014
Comments