<s>[INST] How many 3-digit natural numbers have digits that sum to 13 and leave a remainder of 1 when divided by 4? This is how I approached the problem-
Let the digits be of a three digit number be $a, b, c$. We want $a+b+c = 13$ and $10b + c \equiv 1 \;(\bmod\; 4)$ (Since for a number to be divisible by 4, only the last 2 digits need to divide 4
$10b + c \equiv 1 \;(\bmod\; 4)$ would be $2b + c \equiv 1 \;(\bmod\; 4)$
$ b + b + c \equiv 1 \;(\bmod\; 4)$, Since $b + c = 13 - a$,
$b + 13 - a \equiv 1 \;(\bmod\; 4)$
$b - a \equiv -12 \;(\bmod\; 4)$
$b - a \equiv 0 \;(\bmod\; 4)$
Since both $a$ and $b$ are less than 10, for $a - b$ to be a multiple of 4, it must equal either $0$, $4$ or $8$
First possibility: $a - b = 0$
$a = b$
Since $3 < a + b < 14$ (If $a + b < 4$ , $c$, must be bigger than $9$, which can't happen, and if $a + b > 13$, $c$ must have a negative value to satisfy the equation $a + b + c = 13$, which cannot happen)
substituting $a = b$ in $3 < a + b < 14$, we get
$3 < 2a < 14$
$3/2 < a < 7$
This gives us 5 possible values of $a$, to which there are corresponding values of $b$ and $c$. Following the exact same pattern, we solve the other equations-
We get $4$ solutions for $a - b = 4$ and $1$ solution for $a - b = 8$
This gives us a total of $10$ solutions, which must mean there are $0$ numbers that satisfy the conditions. This however, is wrong, since I know the answer is 17. Where did I go wrong here?
 [/INST] You have not considered the cases $a-b=-4$ and $a-b=-8$; these values are also $0\bmod4$. Here are all possible solutions:
$$193$$
$$157\ 265\ 373\ 481$$
$$229\ 337\ 445\ 553\ 661$$
$$409\ 517\ 625\ 733\ 841$$
$$805\ 913$$
</s>