Well, to approach this, we firstly should understand what is $gcd$ of 8 and 13. It is 1, so we do not require $n$ to have any divisibility properties. Means that we did not shorten our first range at all. Of course we can do some "binary search" over natural numbers and shorten our search range like that but is there a mathematical way to solve it?
Note: there is no 0 in natural numbers
Hint: The general solution of $8x + 13y = n$ is $x=13t+5n$, $y=-8t-3n$ with $t \in \mathbb Z$. The requirement that $x,y \in \mathbb N$ imposes limits on $t$. To count how many $t \in \mathbb Z$ are possible, it is important to know whether $0 \in \mathbb N$.
Here is the solution had in mind:
$x\ge1$ and $y\ge1$ iff $t \in [\frac{1-5n}{13},\frac{-1-3n}{8}]$. This interval has length $L=\frac{n-21}{104}$. Let $N$ be the number of integers in the interval. Then
If $L \le 7$, then $N\le 8$
If $L > 9$, then $N>9$
If $L = 8$, then $N=9$ iff one of the extremes of the interval is an integer
If $L =9$, then $N=9$ iff none of the extremes of the interval is an integer
Now $L=8$ iff $n=853$ and in this case the interval is $[-328,-320]$. So $N=9$ for $n=853$, which is the smallest solution.