cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A235743 Primes p(k) such that p(k) + p(k+3) = p(k+1) + p(k+2) + 4.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Jan 15 2014

Keywords

Comments

If p(k) is in the sequence, then the four consecutive primes p(k), p(k+1), p(k+2), p(k+3) possess a property of quadruplet of consecutive squares: n^2 + (n+3)^2 = (n+1)^2 + (n+2)^2 + 4.
Cf. A022885, where such quadruplets possess a linear property: n + (n+3) = (n+1) + (n+2).

Examples

			17 is in the sequence since 17, 19, 23, and 29 are four consecutive primes and it holds 17 + 29 = 19 + 23 + 4.
		

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