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.

A217674 Primes p = a^2 + b^2 such that (x - a)^2 + (y - b)^2 = 2 and q - p = 4, where q = x^2 + y^2 is prime, assuming that a > b > 0 and x > y > 0.

Original entry on oeis.org

13, 313, 613, 3613, 4513, 21013, 52813, 86113, 99013, 148513, 165313, 241513, 255613, 332113, 787513, 800113, 904513, 1073113, 1720513, 2279113, 2679613, 2940313, 3471613, 4307113, 4605613, 4789513, 5168113, 6072613, 6498013, 6716113, 7469113, 8925313
Offset: 1

Views

Author

Thomas Ordowski, Oct 10 2012

Keywords

Comments

The primes p and q have the smallest difference and the shortest distance on the 2-dimensional plane. Primes p = a^2 + (a-1)^2 == 13 (mod 100) and q = (a+1)^2 + (a-2)^2 == 17 (mod 100), where natural a == 3 (mod 5).

Crossrefs

Cf. A217503.

Programs

  • Mathematica
    isP[p_, p1_List, p2_List] := Module[{q = Sort[Abs[p1 + p2]], s}, s = q[[1]]^2 + q[[2]]^2; q != p1 && s - p == 4 && PrimeQ[s]]; testQ[p_] := Module[{pp = PowersRepresentations[p, 2, 2][[1]]}, isP[p, pp, {-1, -1}] || isP[p, pp, {-1, 1}] || isP[p, pp, {1, -1}] || isP[p, pp, {1, 1}]]; Select[Prime[Range[200000]], Mod[#, 4] == 1 && testQ[#] &] (* T. D. Noe, Oct 19 2012 *)

Formula

A002313(n) such that A217503(n) = 2 and A082073(n-1) = 4.
Intersection of A001844 and A023200.
a(n) = A001844(m) for some m == 2 or 12 (mod 15).
a(n) == 13 (mod 300).

Extensions

Extended by T. D. Noe, Oct 19 2012