I have the following task:
I want to find all integers such that $$ s:= a+b+c\leq 12 $$ and $$ a^2+b^2=c^2 $$ where $a,$ $b$ and $c$ form a primitive Pythagorean triple, that means $(a,b,c) = (m^2 + n^2,2mn,m^2-n^2)$ with $m>n$.
Thanks in advance for any advice.
This is only a start, not a complete solution, but it's way too long for a comment. I'm still working on this, and I hope that others will provide suggestions, or perhaps be able to extend these ideas into a solution.
First, you omitted a couple of facts about the $m$ and $n$ that generate primitive Pythagorean triples. ("Primitive" means that $a,b,c$ are pairwise relatively prime.) First, $m,n$ must be coprime. Second one must be even, and one must be odd. Note that the second fact implies that $c$ is odd.
The important fact about the digit sum of a number is congruent to the original number, modulo $9.$ (This is the basis of "casting out nines.") So we know that $$a+b+c\equiv3\pmod9$$ So far I'm only considering the $s=12$ case. That's really just because of confusion on my part, but I'm sure we can rule out some of the smaller values based on size considerations like those below.
I used these facts to write a little python script to compute the possible values of $(a,b,c)\pmod9.$
This produced the output
Note that each line represents two possibilities. For example the first line represents both
$$a\equiv1\pmod9,b\equiv3\pmod9,c\equiv8\pmod9$$ and $$a\equiv3\pmod9,b\equiv1\pmod9,c\equiv8\pmod9$$
Consider the last line, where $c\equiv1\pmod9$ The digit sum of $c$ must be either $1$ or $10$ since we know it's $\le12$. If it is $1$, then $c=10^n$ for some $n>1$ which is impossible, since $c$ is odd. On the other hand, if the digit sum is $10$, then both $a$ and $b$ are powers of $10$ so not relatively prime. (We know that $1$ is not a member of any Pythagorean triple.)
Therefore, we can eliminate the last possibility. In the other cases, considerations of size lead to the conclusion that the numbers shown are the actual digit sums, not merely the congruence classes.
So far, I haven't been able to rule out any additional lines, nor to see how to find the general solution for lines that can't be ruled out.
EDIT
I updated my python script to consider $s<12$. I also included the facts that the digit sum can never be $0$ and in the case of $c$ it can't be $1$ as shown above. Here's the new script:
This produced the output:
EDIT
I tried out the suggestion of qwr, namely looking at the last two digits of $a,b,c$. Taking $a$ to be even and $b$ to be odd leaves me $62$ possibilities. I think I see how to eliminate a number of them, but it doesn't look very promising overall.