Sum of numbers $x+y$ satisfying $x^2+y^2=p$ with $p$ being a prime number

180 Views Asked by At

(This question has been inspired by a similar one from James Johnson)

It's a well known fact that every prime number $p$ such that:

$$p\equiv 1 \pmod 4\tag{1}$$

can be represented as a sum of two integer squares in a unique way:

$$p=x^2+y^2$$

Suppose that $p_i$ is the $i$-th number of the form (1). Create a sequence of numbers $z_i=x_i+y_i$ where $x_i^2+y_i^2=p_i$:

3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 11, 13, 15, 15, 17, 17, 15, 19, 
19, 15, 17, 21, 19, 17, 23, 23, 21, 19, 25, 25, 25, 23, 25, 25, 27, 
25, 21, 23, 29, 29, 27, 25, 29, 27, 31, 31, 33, 33, 25, 31, 29, 35, 
35, 29, 35, 31, 35, 27, 31, 37, 29, 35, 39, 37, 39, 37, 33, 39, 37, 
41, 33, 35, 41, 43, 43, 39, 41, 35, 37, 43, 45, 41, 35, 37, 41, 43, 
35, 45, 47, 47, 47, 41, 39, 45, 49, 49, 47, 37, 43...

If you plot points $(i,z_i)$ the graph looks like this:

enter image description here

Two questions:

  1. Is this sequence listed somewhere on OEIS? I could not find it, though many similar ones exist.
  2. Conjecture: the sequence listed above contains every odd number $n\ge 3$