We start with establishing the following statement, which is valid for not necessarily different prime numbers m and n:
m∣7n−3nimpliesm=2 or m>n.(5)
First note that m cannot be equal to 3 or 7, hence there exists an integer a such that 3a≡7(modm). The assumption 3n≡7n(modm) implies an≡1(modm), hence ordm(a)∣n. Because n is prime, we can only have ordm(a)=1 or ordm(a)=n. When ordm(a)=1 we have 3≡7(modm), which is only possible when m=2. When ordm(a)=n we recall that we know from Little Fermat that ordm(a)≤m−1. This gives n<m as desired.
Returning to our problem, we now see that p must divide 7p−3p, because p≤q≤r. It follows from (5) that this then is only possible if p=2. Because (72−32)/2=22⋅5, we obtain
qr∣22⋅5⋅(7q−3q)(7r−3r).
As q≤r, by (5) we must have q∣2⋅5⋅(7q−3q) and so q∈{2,5}, by (5) again.
When p=q=2, we have r∣2⋅5⋅(7r−3r) and so r∈{2,5} by (5).
When p=2 and q=5, we have to calculate 75−35. Without a calculator, this can be easily done:
75=49⋅343=50⋅343−343=17150−343=16807.
35=9⋅9⋅3=81⋅3=243 and 75−35=16807−243=16564.
Finally we factorise easily 16564=4⋅4141=22⋅41⋅101. This shows that
r∣2⋅41⋅101⋅(7r−3r).
From (5) we obtain now that r∈{2,41,101}. But 5=q≤r and we are left with r∈{41,101} if p=2 and q=5.
This shows that a complete list of solutions (p,q,r) is
(2,2,2), (2,2,5), (2,5,41), (2,5,101).