Solutions to $\frac{1}a + \frac{1}b + \frac{1}c = \frac{1}{2018}$

combinatoricselementary-number-theorymodular arithmeticnumber theory

Find, with proof, all ordered triplets of positive integers $(a,b,c)$ so that $\dfrac{1}a + \dfrac{1}b + \dfrac{1}c = \dfrac{1}{2018}.$

In general, if $d$ is a positive integer, then $(a,b,c) = (3d,3d,3d),(d,2d,6d),(d,6d,2d), (2d,d,6d),(2d,6d,d),(6d,d,2d),$ and $(6d,2d,d)$ are all ordered triplets of positive integers such that $\dfrac{1}a + \dfrac{1}b + \dfrac{1}c = \dfrac{1}d.$ However, I'm unsure how to find all such triplets. I tried manipulating the equation as follows:
\begin{align}
&1 + \dfrac{a}b + \dfrac{a}c = \dfrac{a}{2018}\\
&\dfrac{a}b + \dfrac{a}c = \dfrac{a-2018}{2018}\\
&\dfrac{ab}{c } = \dfrac{b(a-2018)-2018a}{2018}\\
&c[b(a-2018)-2018a]-2018ab = 0\\
&c[(a-2018)(b-2018)-2018^2]-2018ab = 0\\
&c[(a-2018)(b-2018)]-2018(ab-2018(a+b)+2018^2+2018(a+b)-2018^2)-2018^2 c =0 \\
&(c-2018)(a-2018)(b-2018)-2018^2(a+b+c)+2018^3 = 0\\
&(c-2018)(b-2018)(a-2018) = 2018^2(a+b+c) – 2018^3,
\end{align}

but I don't know whether this is useful.

Source (from comments): I based this off a contest problem. I came up with it by myself. The question I based it on was the Putnam 2018 question A1.

Best Answer

I wrote a little Python program that did the brute force. It found $670$ solutions with $a \le b \le c$ The first was $$a=2019, b= 4074343, c= 16600266807306$$ There were $40$ with $a=2019$ and the last of those was $$a=2019, b=c=8148684$$

As long as nobody laughs too loud, here is the code. I just let $a$ range from $n+1$ to $3n$, compute the range of $b$ to be so that $\frac 1b \le \min(\frac 1a, \frac 1n-\frac 1a)$, compute $c$ using integer division, then see if it comes out even. succ counts the successes. This is Python 2.

def prog(n, plev=0):
    succ=0
    astart=n+1
    aend=3*n
    if (plev > 19): print 'astart, aend',astart, aend
    for a in xrange(astart,aend+1):
        bstart=max(n*a/(a-n)+1,a)
        bend=2*n*a/(a-n)
        if (plev > 19):  print 'bstart, bend', bstart, bend
        for b in xrange(bstart, bend+1):
            c=n*a*b/(a*b-n*(a+b))
            if (n==a*b*c/(a*b+a*c+b*c)):
                print 'success',a,b,c
                succ+=1
    print 'successes',succ
Related Question