No of pairs of integers $(x,y)$ such that $x^2+2y^2<25$

566 Views Asked by At

enter image description here

Using Stars and Bars, one can easily find out the pairs (a,b) that sum upto 25, then 24 then 23.....and eliminate all 'a's and 'b's which are not squares and all 'b's which are odd. But is this the only way? Is there no better way? Please help.

1

There are 1 best solutions below

0
On BEST ANSWER

As the comments correctly note, since we know that $|y|\leq3$, we can simply check all the values by hand.

\begin{array}{|c|c|} \hline y&x\\\hline -3&-2,-1,0,1,2\\\hline -2&-4,-3,-2,-1,0,1,2,3,4\\\hline -1&-4,-3,-2,-1,0,1,2,3,4\\\hline 0&-4,-3,-2,-1,0,1,2,3,4\\\hline 1&-4,-3,-2,-1,0,1,2,3,4\\\hline 2&-4,-3,-2,-1,0,1,2,3,4\\\hline 3&-2,-1,0,1,2\\\hline \end{array}

So there are a total of $\color{red}{55}$ pairs.