## Count of (x,y) pairs that satisfy the equation x^2+y^2 = n^2

Given (n) , what is the Count of (x,y) pairs that satisfy the equation x^2+y^2 = n^2. Is there any way I can re-write this code just without using nested loop?

int counter=0;     int x=0;       for (int i =(int) n-1; i>=0 ; i--){          if(i == x)             break;           for (int j = 1; j< (int)n ; j++){              if (Math.pow(i,2)+Math.pow(j,2) == Math.pow(n,2)){                 counter++;                 x = j;             }         }     }  System.out.print(counter); 
Posted on Categories proxies

## Are these 5 the only eta quotients that parameterize $x^2+y^2 = 1$?

Given the Dedekind eta function $$\eta(\tau)$$, define,

$$\alpha(\tau) =\frac{\sqrt2\,\eta(\tau)\,\eta^2(4\tau)}{\eta^3(2\tau)}$$

$$\beta(\tau) =\frac{\eta^2(\tau)\,\eta(4\tau)}{\eta^3(2\tau)}$$

Note that $$\alpha^8(\tau)=\lambda(2\tau)$$ with modular lambda function $$\lambda(\tau)$$. We have the well-known,

$$\alpha^8(\tau)+\beta^8(\tau) = 1\tag1$$

as well as the nice,

$$\frac{1}{\beta^2(\tau)}-\beta^2(\tau) =\left(\frac{2^{1/4}\,\alpha(2\tau)}{\beta(2\tau)}\right)^4\tag2$$

$$\frac{1}{\alpha^2(2\tau)}-\alpha^2(2\tau) =\left(\frac{2^{1/4}\,\beta(\tau)}{\alpha(\tau)}\right)^4\tag3$$

and,

$$\frac{1}{\alpha^2(2\tau)}+\alpha^2(2\tau) =\left(\frac{2^{1/4}}{\alpha(\tau)}\right)^4\tag4$$

$$\frac{1}{\beta^2(\tau)}+\beta^2(\tau) =\left(\frac{2^{1/4}}{\beta(2\tau)}\right)^4\tag5$$

As eta functions (not as quotients $$\alpha$$ and $$\beta$$), these 5 are in Somos’ database (as t4_24_48, t8_12_24, t8_12_48, t8_18_60a, t8_18_60b). After some algebraic manipulation, I realized these can be expressed in more aesthetic forms. (Of course, it is easy to transform these to the form $$x^2+y^2=1$$.)

Questions:

1. For the next step, can we express $$\frac{1}{\beta^4(\tau)}+\beta^4(\tau) =t_1^2$$ $$\frac{1}{\alpha^4(2\tau)}+\alpha^4(2\tau) =t_2^2$$ where the $$t_i$$ are eta quotients?
2. Are there are other eta quotient parameterizations strictly of form, $$\left(m_1\prod\eta(a_1\tau)^{c_1}\,\eta(a_2\tau)^{c_2}\dots\right)^2 + \left(m_2\prod\eta(b_1\tau)^{d_1}\,\eta(b_2\tau)^{d_2}\dots\right)^2 = 1$$ where $$a_i, b_i, c_i, d_i$$ are integers (the exponents $$c_i,d_i$$ may be negative) and $$m_i$$ are algebraic similar to the above 5?