# Integers $d$ for which the Negative Pell equation is soluble for both $d$ and $2d$?

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.

It is necessary to use the formula. http://www.artofproblemsolving.com/blog/101140

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

$$z^2-2dg^2=-1$$

It will give us a series of solutions using the Pell equation: $$p^2-2s^2=k$$

Let us use the fact that the following solution can be found knowing the previous, formula.

$$p_2=3p_1+4s_1$$

$$s_2=2p_1+3s_1$$

Using certain series of solutions you can find ratio formula.

$p^2-2s^2=1$ $;$ $(p_1;s_1) - (3;2);$ $d=s^2+1$

$p^2-2s^2=-1$ $;$ $(p_1;s_1) - (1;1) ;$ $d=s^2+4$

$p^2-2s^2=-7$ $;$ $(p_1;s_1) - (1;2) ;$ $d=s^2+1$

$p^2-2s^2=7$ $;$ $(p_1;s_1) - (3;1) ;$ $d=s^2+4$

$p^2-2s^2=17$ $;$ $(p_1 ; s_1) - (5;2) ;$ $d=s^2+9$

While it is difficult to say. Limited to any solution of these series or not. Clearly what is involved in this equation Pell.

• which formula I have to use in your link? is this an answer? if yes: what is your conclusion about the characterization of the integers $d$ for which the two equations have solutions? thanks Commented Feb 18, 2015 at 14:48
• @Elaqqad You don't understand the meaning of the formulas on the link and those who drew? Commented Feb 18, 2015 at 14:58
• yes I didn't find any connexion between my question and the link,I think that I need more explications, thinks. Commented Feb 18, 2015 at 15:05