Skip to main content
3 of 4
Clarify non-square.
Tito Piezas III
  • 12.6k
  • 1
  • 39
  • 89

(Too long for a comment.)

The sequence of integers such that $x^2-py^2=-1$ is solvable is given by,

$$p = 1, 2, 5, 10, 13, 17, 26, 29, 37, 41, 50, 53, 58, 61, 65, 73, 74, 82, 85, 89, 97, 101,\dots$$

which is A031396, while that of $x^2-2q y^2 = -1$ is (if I did my code right),

$$q = 1, 5, 13, 25, 29, 37, 41, 53, 61, 65, 85, 101, \dots$$

and is not yet in the OEIS.

Point 1: The sequence $p$ does not contain non-square $q$ as a subset.

With limited data, it seems to be the case. But the first missing value is $q=221$, since $x^2-221y^2=-1$ is not solvable, while $x^2-2\cdot221y^2=-1$ is.

Point 2: There is an infinite number of intersections between $p$ and $q$.

Proof: We use the identities,

$$m^2-(m^2+1)\cdot 1^2 = -1$$

$$(2n+1)^2-2\cdot(2n^2+2n+1)\cdot 1^2 = -1$$

Equate,

$$m^2+1 = 2n^2+2n+1$$

and turns out to be a well-known Pell equation in disguise,

$$(2n+1)^2-2m^2 = 1$$

$$u^2-2v^2=1$$

with solutions $(u,v) = (3,2),\,(17,12),\,(99,70),\dots$ and proves there is an infinite number of $d$ such that

$$x^2-dy^2 = -1$$

$$x^2-2dy^2 = -1$$

is both solvable.

P.S. However, to characterize all $d$ seems to be difficult.

Tito Piezas III
  • 12.6k
  • 1
  • 39
  • 89