# An equation of the form A + B + C = ABC

So I was on a SPOJ spree until I came across this question . The question says $$\tan(\frac{1}{A}) = \tan(\frac{1}{B}) + \tan(\frac{1}{C})$$

where we have to find the $\min(B+C)$ for a fix $A$ where $A,B$ and $C$ all are positive integers. After some rearrangement I got $A+B+C = ABC$ . I have no clue how to solve such an equation for positive integers . I just tried some value of $A$ as in I tried $7$ which gives $7BC = 7+B+C$ but by trial and error ( for finding positive integer solutions ) it doesn't seem any $B$ and $C$ will satisfy the equation . Any hints on how to proceed ?

PS : I don't have much knowledge but is this a diophantine equation.

• Since you are asking for integer solutions, yes, this is a diophantine equation: $A + B + C = ABC$. – hardmath Aug 1 '14 at 13:39
• I have asked a more basic, follow-up question at math.stackexchange.com/questions/884695/… – Doubt Aug 1 '14 at 15:34
• @Doubt sorry it was arctan not tan – abkds Aug 1 '14 at 16:48
• @Zoro - it still does not seem to work. Did you mean $\arctan(1/A) = \arctan(C) - \arctan(1/B)$? – Doubt Aug 1 '14 at 20:32
• $axy+bx+cy=d$ is equivalent $a^2xy+abx+acy+bc=ad+bc$ or $(ax+c)(ay+b)=ad+bc$ This can be used to your case $A=7$ – Bumblebee Aug 4 '14 at 9:48

This is pretty standard. Since the equation is symmetric in $A,B,C$, it suffices to find all solutions with $A \leq B \leq C$ and then by permutations you get all of them.

Then $$ABC = A+B+C \leq C+C+C =3C$$ which implies $AB \leq 3$.

Now, since $A \leq B$, there are only three possibilities such that $A B \leq 3$. In each of them $ABC=A+B+C$ becomes a simple equation in $C$.

• Dude I just asked for a hint you gave the complete solution – abkds Aug 1 '14 at 13:42
• @Zoro deal with it you nub, it's a good solution – John Fernley Aug 1 '14 at 13:44
• @Zoro The issue with problems like this is that I don't see any good hint, once I hint that $ABC \leq 3C$, that's basically the solution. – N. S. Aug 1 '14 at 13:53
• yeah you are right . Thanks a lot :)! – abkds Aug 1 '14 at 13:54
• @Zoro P.S. This is a pretty standard technique for Diophantine equations in multiple variables, where both sides are positive and one side has degree (much) lower than the other side. – N. S. Aug 1 '14 at 13:56