OFFSET
1,2
COMMENTS
Every prime p of the form 4k+1 has a unique solution p = x^2 + y^2. This sequence gives the squared distance between points (x,y) for consecutive primes of this form.
The squares mutual distance consecutive points with coordinates x(n) = A002331(n) and y(n) = A002330(n), where x(n)^2 + y(n)^2 = A002313(n) is prime.
Theorem: a(n) =/= A082073(n-1) for all n > 1. Generally, it can be shown that there is no pair of primes p = a^2 + b^2 and q = x^2 + y^2 such that (a - x)^2 + (b - y)^2 = |p - q| > 0.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
EXAMPLE
5 = 1^2 + 2^2 and 13 = 2^2 + 3^2. The squared distance between the points (1,2) and (2,3) is 2, the second term of this sequence.
MATHEMATICA
nn = 200; p = Select[Prime[Range[nn]], Mod[#, 4] == 1 &]; q = {1, 1}; Table[pp = PowersRepresentations[p[[i]], 2, 2][[1]]; d = pp - q; q = pp; d[[1]]^2 + d[[2]]^2, {i, Length[p] - 1}] (* T. D. Noe, Oct 19 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski, Oct 05 2012
STATUS
approved