Prime numbers yield from Pythagoras triples Pythagoras theorem $$a^2+b^2=c^2$$
we got $$P_{prime}(a,b)={a^4+b^4+(a+b)^4\over a^2+b^2+(a+b)^2}$$
Where $(a,b,c)$ are Pythagoras theorem triples, this function $P_{prime}(a,b)$ always produce a prime number for the values of a and b.
Examples: $P_{prime}(3,4)=37$, $P_{prime}(5,12)=229$, $P_{prime}(68,285)=105229$ and so on...
I have checked a lot of values, it seem to be prime so far.
My question is: Does the function $P_{prime}(a,b)$ always produce prime numbers?
 A: Let $a=2xy,$ and $b=x^2-y^2$.
Hence, we obtain:
$$\frac{(2xy)^4+(x^2-y^2)^4+(2xy+x^2-y^2)^4}{(2xy)^2+(x^2-y^2)^2+(2xy+x^2-y^2)^2}=x^4+y^4+2x^3y-2xy^3+2x^2y^2.$$
We can get this expression by the following.
$$\frac{a^4+b^4+(a+b)^4}{a^2+b^2+(a+b)^2}=\frac{2(a^4+2a^3b+3a^2b^2+2ab^3+b^4)}{2(a^2+ab+b^2)}=$$
$$=\frac{(a^2+ab+b^2)^2}{a^2+ab+b^2}=a^2+ab+b^2=x^4+y^4+2x^3y-2xy^3+2x^2y^2.$$
Now, easy to find a counterexample: $x=10$ and $y=1$, which gives $a=20$ and $b=99.$  
A: $P_{prime}(6,8)=148$ is not prime
$P_{prime}(7,24)=793=13\cdot61$ so it doesn't hold even for primitive triples
A: This is a more abstract take on my computational answer.
The fraction cancels out to $a^2+ab+b^2$.
Now suppose that we have a prime $p=12n+1$. Modulo $p$ the multiplicative group is cyclic of order $12n$. We work modulo $p$, so we can find $w$ and $t$ with $w^3=1, w\neq 1$ and $t^2=-1$.
Now choose $y$ and let $x=(w+w^2t)y$
If we now set $a=x^2-y^2=(w^2+2t-w-1)y^2=2w^2(1+wt)y^2$ and $b=2xy=2w(1+wt)y^2$ whence $a=wb$ and we have $$a^2+ab+b^2=b^2(1+w+w^2)=0$$So we have solved the congruence modulo $p$.
We can choose $\pm t$ and $w$ or $w^2$ for this construction, but once selected they give an infinite family of solutions modulo $p$. These grow indefinitely, and since divisible by $p$ the larger ones are not prime.

As an example, for $p=13$ we have $5^2\equiv-1$ and $3^3\equiv 1$.
Choose $y=1$ to give $x=3+45\equiv-4$ and $a=15, b=-8$ which gives a value of $169$.
We could also choose $y=1, x=9$ (we can choose equivalents modulo $13$) to give $a=80, b=18$
Choosing $y=2$ gives $x=2\times -4\equiv5$ and this gives $a=21, b=20$ giving $1261=13 \times 97$ and again we can choose any representatives of the residue classes for $x$ and $y$ giving an infinite family of solutions.

Note that this can be written in terms of a primitive twelfth root of unity modulo $p$ as $x=(u-u^2)y$ with $a=2u^3(u-1)y^2, b=2u(1-u)y^2$. Since there are four such roots $(u, u^5, u^7, u^{11})$, this encompasses the four choices which could be made above.
