<s>[INST] Pseudo-pythagorean theorem Pythagoras' theorem is a special case of the Cosine theorem for a angle of $90°$. But also for an angle of 60° and 120°, "aesthetical" special cases derive:
$c^2=a^2+b^2\pm ab$
First question:
Are there further angle $x°$ with a rational number $x$, so that $\cos x$ is rational as well, thus creating "aesthetical" special cases?
Second question:
Does anybody know some internet sources to the equivalent of pythagorean triplets (Integers $a,b,c$, so that $c^2=a^2+b^2\pm ab$)?
 [/INST] If $\cos\frac {2m\pi}n$ is rational with $\gcd(m,n)=1$, then the primitive $n$th root of unity $\zeta=\cos \frac{2m\pi}{n}+i\sin\frac{2m\pi}n$ is a root of the rational polynomial $X^2-2\cos \frac{2m\pi}{n}X+1$. On the other hand, we know that $\zeta$ is a root of $X^n-1$ and any factorization of this over the rationals can be resaled to a factorization over the integers. Since $X^2-2\cos \frac{2m\pi}{n}X+1$ is monic this implies that $2\cos\frac{2m\pi }{n}$ is already an integer of absolute value $\le 2$.
This leads to the cases


*

*$c^2=a^2+b^2+2ab$ for $\gamma = \pi$

*$c^2=a^2+b^2+ab$ for $\gamma = \frac 23\pi$ or $\gamma = \frac 43\pi$

*$c^2=a^2+b^2$ for $\gamma =\frac 12\pi$ or $\gamma = \frac 32\pi$

*$c^2=a^2+b^2-ab$ for $\gamma=\frac13\pi$ or $\gamma =\frac 53\pi$

*$c^2=a^2+b^2-2ab$ for $\gamma =0$


and that's all with $\gamma \in[0,2\pi)\cap \pi\mathbb Q$.

Regarding your second question: Pythagorean triples are best viewed as numbers $z=a+bi\in\mathbb Z[i]$ with norm $z\bar z$ a perfect square, which leads to a partitioning of the set of primes into those with $p\equiv -1\pmod 4$ (which can only occur as factor of $c$ if they are also factors of $a$ and $b$) and those with $p\equiv 1\pmod 4$ (which can be written as sums of squares and lead to primitive pythagorean triangles; for example $5=2^2+1^2=(2+i)(2-i)$ give us $\color{red}5^2=(2+i)^2(2-i)^2=(\color{red}3+\color{red}4i)(3-4i)$ and hence the most famous Pythagorean triangle) and the special prime $2$. Similarly, the numbers aou are after should be viewed as elements of $\mathbb Z[\omega]$ where $\omega=-\frac12+\frac i2\sqrt 3$. It turns out that one gets a similar partitioning of the primes, this time based on the remainders modulo $3$. Those are very interesting number theoretic questions indeed.
</s>