<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] $12x + 13y = n$
$12(-n)+13(n)=n$ implies $x(t)=-n+13t$ and $y(t)=n-12t$
$x(t) \ge 0 \implies t \ge \dfrac{n}{13}$
$y(t) \ge 0 \implies t \le \dfrac{n}{12}$
So $\dfrac{n}{13} \le t \le \dfrac{n}{12}$
The existence of $11$ solutions implies
$$\text{$\dfrac{n}{13} \le t_0$ and  $t_0 + 10 \le \dfrac{n}{12}$} \tag{1}$$
That is, 
$$\dfrac{n}{13} \le t_0 \le \dfrac{n-120}{12}\tag{2}$$
 for some integer $t_0$.
We find $12n \le 156t_0 \le 13n - 1560$
Or $$0 \le 1560t_0-12n \le n - 1560 \tag{3}$$
So $n \ge 1560$.
For $n = 1560$, condition $(3)$ becomes $0 \le 1560t_0-12n \le 0$. 
So $t_0 = 120$. 
It follows that $12x+13y = 1560$ has solutions, 
$\{(0, 120), (13, 108), (26, 96), (39, 84), (52, 72), (65, 60), (78, 48), (91, 36), (104, 24), (117, 12), (130, 0)\}$
That is to say, $n = 1560$.
</s>