OFFSET
1,2
COMMENTS
We walk through the Gaussian primes in the first octant of the Gaussian plane along increasing norm: 1+i, 2+i, 3, 3+2i, 4+i, 5+2i, 6+i, 5+4i, 7, 7+2i etc. The sequence lists the squared distance between consecutive Gaussian primes along this walk.
EXAMPLE
The squared distance between 5+4i and 6+i is (6-5)^2+(4-1)^2 =10 = a(7).
MATHEMATICA
nMx = 1000; modLst = {2}; Do[p = Prime[n]; If[Mod[p, 4] == 1, AppendTo[modLst, p], If[p^2 < nMx, AppendTo[modLst, p^2]]], {n, 2, PrimePi[nMx]}]; modLst = Union[modLst]; last = {1, 1}; Table[pr = PowersRepresentations[n, 2, 2][[1]]; dist = SquaredEuclideanDistance[last, pr]; last = pr; dist, {n, Rest[modLst]}] (* T. D. Noe, Oct 29 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski, Oct 23 2012
STATUS
approved