How many triangles are there whose sides are prime numbers and have a perimeter equal to $29$? 
Perimeter of a triangle is equal to $29$ and the values of all three sides are prime number. How many many incongruent triangles we have with this properties?


$1)2\qquad\qquad\qquad2)3\qquad\qquad\qquad3)4\qquad\qquad\qquad4)5$

First I realized that we can't have a side equal to $2$ because then perimeter will be even number. And we know that if $a,b,c$ are the values of sides we have:
$$a+b>c$$
Hence $29-c>c$ and $c<14.5$, similarly we have $a<14.5$  and $b<14.5$,  so we have $a,b,c\in\{3,5,7,11,13\}$ and $a+b+c=29$
From here is it possible to proceed without Try and Error ?
 A: Modulo $6$ the residues of the primes are $3,-1,1,-1,1$ respectively – and our target has residue $-1$ modulo $6$. If we use two $3$s the last side must be $23$, which is impossible. If we use one $3$ the other two sides must have residue $1$ each and sum to $26$ – the only possibility is $13$ and $13$. If no $3$s, there must be two residue $-1$ numbers and one residue $1$ number:

*

*If the residue $1$ number is $7$, we can only have $11$ and $11$

*If that number is $13$, we can only have $5$ and $11$
Hence there are $3$ incongruent admissible triangles: $\{3,13,13\},\{7,11,11\},\{5,11,13\}$.
A: You have set up the problem really well.
Let's think about how trial and error would work.  The only solution with a $3$ in it is $3+13+13$.  Now, can we upgrade the $3$ to a $5$ and reduce $2$ from one of the other sides?  Yes, that would lead to $5+11+13$.  That is the only solution with a $5$.  Can we do it again?  Yes, but moving the $5$ to a $7$ has to be balanced by reducing the other $13$, because $9$ is not prime.  Therefore, $7+11+11$ is the only solution with a $7$ in it.
Since you couldn't have any solutions without a $3, 5,$ or $7$ with a total of $29$, those are the only three solutions.
