<s>[INST] Find $n$ such that there are $11$ non-negative integral solutions to $12x+13y =n$ 
What should be the value of $n$, so that $12x+13y = n$ has 11 non-negative integer solutions?

As it is a Diophantine equation, so we check whether the solution exists? it exists if $gcd(12,13)|n$ that is $1|n$ and hence integer solutions to $12x+13y = n$ exist. 
To find the solutions explicitly, we write $1 $ as the linear combinations of $12$ and $13$ that is $1 = 12(1) + 13(-1)$, next we write $n = 12(n) + 13(-n)$ so that the integer solutions to $12x+13y = n$ is $x = n + t(12)$ and $y = -n + t(13)$. To check for non-negative integral solutions, $x \geq 0$ and $y \geq 0$ so that $t \geq -\frac{n^2}{12}$ and $t \geq \frac{n^2}{13}$ so $t \geq \frac{n^2}{13}$. But now I am struggling how to relate this  to the 11 number of non-negative integral solutions?.Any help?
 [/INST] Note that from the following hint
$$-1\cdot 12+1\cdot 13=1 \implies (-1+k \cdot 13)\cdot 12+(1-k\cdot 12)\cdot 13=1$$
we have 
$$-n\cdot 12+n\cdot 13=n \implies (-n+k \cdot 13)\cdot 12+(n-k\cdot 12)\cdot 13=1$$
and we need 


*

*$-n+k \cdot 13\ge 0$

*$n-k\cdot 12\ge 0$
that is
$$\frac n{13}\le k\le\frac n{12}$$
which leads to $n=10\cdot 12\cdot13$ with
$$12x+13y=10\cdot 12\cdot13$$
which has the following solutions 
$$x=13k \quad y=120-12k \quad k=0,1,2,\ldots,10$$
</s>