A217503 Squared distance between consecutive primes of the form 4k+1 (see below).
1, 2, 2, 2, 2, 10, 8, 10, 8, 4, 2, 10, 4, 20, 18, 10, 2, 20, 58, 8, 40, 2, 40, 20, 10, 90, 2, 20, 10, 116, 2, 8, 20, 10, 2, 10, 20, 26, 4, 146, 8, 34, 10, 40, 34, 40, 2, 20, 2, 160, 50, 10, 180, 2, 180, 90, 58, 40, 130, 16, 116, 194, 50, 136, 74, 34, 52, 40
Offset: 1
Keywords
Examples
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.
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
Programs
-
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 *)
Comments