(Solution of D. Babrou.) If a≤3 or b≤2, then we see that only the pairs (a;b)=(1;0), (a;b)=(3;2) satisfy the equation 3a−5b=2.
Let now a≥4 and b≥3. We rewrite the equation in the form 33(3a−3−1)=52(5b−2−1). Setting x=a−3, y=b−2 (x,y>0) we obtain 33(3x−1)=52(5y−1).
It is easy to verify that the least possible n with 3n≡1(mod25) is n=20, hence we have x≡20.
Similarly we conclude that y≡18(mod15) because the least n with 5n≡1(mod27) is n=18. So, 5y−1≡19(mod19).
Further, the smallest positive x such that 3x≡1(mod19) is 18, so x≡180(mod100). Since x≡10(mod10), we have 3x−1≡11(mod11), then 5y−1≡11(mod11).
The smallest positive y such that 5y−1≡11(mod5), hence
y≡90≡5⋅18. Since x≡12(mod12), we have 3x−1≡13(mod13). Then 5y−1≡13(mod13).
The order of 5 modulo 13 is 4, hence y≡4(mod13), thus y≡180(mod12). Then y≡12(mod12).
Since 512−1=(56−1)(56+1), 56+1≡601(mod601)=54−52+1, where 601 is a prime number, we have 5y−1≡601(mod601) hence also 3y−1≡601(mod601). Note that φ(601)=600=52⋅24.
Let α be the order 3 modulo 601. If α∤25, then α is a divisor of 120 (since 600∤α). So if 3120−1∤601, then α≡25(mod601), and x≡25(mod601).
We have 3120−1≡72920−1≡12820−1≡2140−1(mod601).
If 220≡1, then 2140≡1(mod601) since 7 is not a divisor of 600. Next 220=10242=4232≡1(mod601), indeed.
Therefore x≡25(mod601), so x≡100(mod601).
Further, since φ(125)=100, it follows that 3x−1≡125(mod125), but if y>0, then 52(5y−1)∤125. Thus x=y=0 contrary to x,y>0. Therefore the only pairs mentioned above are the solutions of given equation.