Suppose you have three positive integers $a, b, c$ that form a Pythagorean triple: \begin{equation} a^2 + b^2 = c^2. \tag{1}\label{1} \end{equation} Additionally, suppose that when you apply Euler's totient function to each term, the equation still holds: $$ \phi(a^2) + \phi(b^2) = \phi(c^2). \tag{2}\label{2} $$ One way this can happen is if $a^2, b^2, c^2$ have the same primes in their prime factorization. (For example, starting from the Pythagorean triple $3,4,5$, we could multiply all three terms by $30$ to get $90, 120, 150$. If we do, then we have $90^2 + 120^2 = 150^2$ and $\phi(90^2) + \phi(120^2) = \phi(150^2)$.) In that case, because all three terms are squares, they all contain these prime factors at least twice, and so we must have $$ \phi(\phi(a^2)) + \phi(\phi(b^2)) = \phi(\phi(c^2)). \tag{3}\label{3} $$ My question is: are there any "atypical" solutions to the two equations $\eqref{1}$ and $\eqref{2}$ for which $\eqref{3}$ does not hold? Or at least where $\eqref{1}$ and $\eqref{2}$ hold, but the prime factorizations of $a,b,c$ do not consist of the same primes, even if $\eqref{3}$ happens to hold for a different reason?

In the comments, Peter and Gerry Myerson have checked small cases (all triples for $1 \le a \le b \le 10^5$ and primitive triples generated by $(m,n)$ for $1 \le n \le m \le 2000$) without finding any atypical solutions.

Here is an in-depth explanation for why typical solutions like $(90,120,150)$ work. By a typical solution, I mean a solution where $a,b,c$ have the same primes in their prime factorization. Such a triple satisfies $\eqref{2}$ and $\eqref{3}$ whenever it satisfies $\eqref{1}$, as shown below.

Let $\operatorname{rad}(x)$ denote the radical of $x$: the product of all distinct prime factors of $x$. To get a typical solution, we start with any Pythagorean triple, then scale $(a,b,c)$ so that $\operatorname{rad}(a) = \operatorname{rad}(b) = \operatorname{rad}(c) = r$.

It is a general totient function identity that whenever $\operatorname{rad}(x) = r$, $\phi(x) = \frac{\phi(r)}{r} \cdot x$. In other words, $\phi(x) = x \prod\limits_{p \mid x} \frac{p-1}{p}$ where the product is over all primes $p$ that divide $x$.

In the case above, we have $$ \phi(a^2) + \phi(b^2) = \frac{\phi(r)}{r} \cdot a^2 + \frac{\phi(r)}{r} \cdot b^2 = \frac{\phi(r)}{r} \cdot c^2 = \phi(c^2), $$ and $\eqref{2}$ holds. Moreover, since $r \mid a,b,c$, we have $r^2 \mid a^2,b^2,c^2$, so when we multiply by $\frac{\phi(r)}{r}$, we have $r \phi(r) \mid \phi(a^2), \phi(b^2), \phi(c^2)$. Therefore all prime factors of $r \phi(r)$ divide each of $\phi(a^2)$, $\phi(b^2)$, and $\phi(c^2)$. These are all their prime factors, since $r$ contained all the prime factors of $a^2, b^2,c^2$ and since then the only new prime factors introduced came from multiplying by $\phi(r)$.

As a result, $\phi(a^2), \phi(b^2), \phi(c^2)$ still have the same set of prime factors: $\operatorname{rad}(\phi(a^2)) = \operatorname{rad}(r \phi(r)) = s$, and similarly $\operatorname{rad}(\phi(b^2)) = \operatorname{rad}(\phi(c^2)) = s$. So $\eqref{3}$ holds, because $$ \phi(\phi(a^2)) + \phi(\phi(b^2)) = \frac{\phi(s)}{s} \cdot \phi(a^2) + \frac{\phi(s)}{s} \cdot \phi(b^2) = \frac{\phi(s)}{s} \cdot \phi(c^2) = \phi(\phi(c^2)). $$

Misha Lavrov
  • 113,596
  • 10
  • 105
  • 192
  • 5
    I checked all pairs $(a/b)$ with $1\le a\le b\le 10^4$ without finding an example. Currently I am checking with limit $10^5$ – Peter Feb 19 '18 at 23:54
  • 13
    No example for $1\le a\le b\le 10^5$ either. – Peter Feb 20 '18 at 21:03
  • 10
    I checked $a=2mn$, $b=m^2-n^2$, $c=m^2+n^2$, $m$ from 2 to 2000, $n$ from 1 to $m-1$ without finding an example. – Gerry Myerson Feb 26 '18 at 00:41
  • 3
    It seems that squares , satisfying $(1)$ and $(2)$ , have the same set of prime factors. If we can prove that the prime factors of $a,b$ and $c$ must coincide, the claim follows immediately. Unfortunately, I have no idea how this can be done. – Peter Mar 07 '18 at 11:17
  • Well, while were at it, let’s piggy-back a couple conjectures on top of this question: 1) Can the Boolean Pythagorean Triples Problem be solved for the Pythagorean triples that survive the totient function? 2) Can the Boolean Pythagorean Triples Problem be solved for the atypical Pythagorean triples that survive the totient function? (Of course, conjecture 1 implies conjecture 2.) Furthermore, can a similar question as that of the OP be fruitfully asked about the REDUCED totient function (i.e., the Carmichael lambda function)? –  Dec 17 '21 at 02:40
  • @EulerSpoiler (1) is easy. Take all the numbers $\{1,\dots, 7825\}$ and multiply them by $7825!$ so that all the triples among them are now surviving triples. The structure of the triples didn't change, so because any coloring of the original set had a monochromatic triple, any coloring of the new set has a monochromatic *surviving* triple. – Misha Lavrov Dec 17 '21 at 02:56

1 Answers1


Possible help:

Every Pythagorean triple is of form $$(2mn,m^2-n^2,m^2+n^2)$$ If $m$, $n$ are not coprime then these all share a factor. But it can be proven that all pythagorean triples have:

  • at least 1 entry divisible by 3
  • at least 1 entry divisible by 4
  • at least 1 entry divisible by 5

not necessarily all distinct, As Euler's phi function is multiplicative these may come into play.

A proof follows:

If at least one of $m$, $n$ is divisible by 3, it follows that all of the values are divisible by 3. If neither is, it follows that their squares are both remainder 1 on division by 3 so $m^2-n^2$ will divide by 3. If at least 1 of $m$, $n$ are even $2mn$ is divisible by 4. Otherwise, both have squares that have remainder 1 on division by 4, so $m^2-n^2$ is divisible by 4. Lastly, if at least 1 of $m$, $n$ is divisible by 5, then $2mn$ is divisible by 5. If their squares have the same remainder on division by 5, then $m^2-n^2$ is divisible by 5. Finally, if the remainders of the squares are different then $m^2+n^2$ is divisible by 5.

Since Euler's phi function is multiplicative, multiplying it's outputs for any pair of coprime values as inputs, will create the output for their product. Any case where the 4 and 5 don't overlap forces the other leg to follow suit and give a Euler phi output it's a multiple of 4. Since any multiple of 4 except 4 itself, has a output that is also a multiple of 4, as will any product with 2 or more odd primes. It seems nearly certain parity won't be broken by equation 3 in any case where equation 2 holds.

Xander Henderson
  • 24,007
  • 25
  • 53
  • 82
  • 1
    It seems like starting with this approach we can maybe hope to show that $a,b,c$ must all be divisible by $2$, $3$, and $5$, which would be progress: three primes down, only a few more to go :) – Misha Lavrov Feb 17 '19 at 21:35
  • well no, 3,4,5 or 5,12,d or 3,20,d or 4,15,d or e,60,d or some arrangement (permutation) of these must occur in the divisors of a, b , c respectively. –  Feb 17 '19 at 21:43
  • I mean, with the further assumption that the triple we're looking at survives $\phi$. – Misha Lavrov Feb 17 '19 at 21:44
  • well with any of the above except 3,20,d and e,60, d two of the phi values will be divisible by 4 forcing the last to, or breaking distributivity. –  Feb 17 '19 at 21:47