Let $\text{NPE}_d$ denote the negative Pell equation: $$ x^2-dy^2=-1$$ Where $d$ is a given positive nonsquare integer and integer solutions are sought for x and y.

we know that (in this paper):

Theorem : The equation $\text{NPE}_d$ has integer solutions if and only if there exist two integers $a(d)=a$ and $b(d)=b$ such that $d=a^2+b^2$ and there exists a Pythagorean triplet $(A,B,C)$ such that $|aA-bB|=1$ and in this case $(Aa+Bb,C)$ is a solution.

Obviously if $\text{NPE}_d$ has integer solutions then $d$ cannot be divisible by any prime $p$ such that $p=3\mod 4$.

My question: Is there any characterization for the integers $d$ for which $\text{NPE}_d$ and $\text{NPE}_{2d}$ have both integer solutions.

I used the characterization above, but I can't link the couple $(a(d),b(d))$ to $(a(2d),b(2d))$ because the theorem doesn't give us much information

The sequence of the elements $d$ for which $\text{NPE}_d$ is soluble is OEIS A031396.

Iposted this question in math.extcahenege and does not receive any answer


(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$$


$$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$$


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.

| cite | improve this answer | |
  • $\begingroup$ The number 25 is in your list of values of $q$, so that is the first missing value. $\endgroup$ – KConrad May 16 '15 at 16:16
  • $\begingroup$ @KConrad: Oops, I was not being precise. I was focusing on whether there were missing non-square $q$. $\endgroup$ – Tito Piezas III May 17 '15 at 1:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.