# 2007 iTest Problems/Problem 45

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

## Problem

Find the sum of all positive integers $B$ such that $(111)_B=(aabbcc)_6$, where $a,b,c$ represent distinct base $6$ digits, $a\neq 0$.

## Solution

Using the definition of base numbers, the equation can be rewritten as $$B^2 + B + 1 = 9072a + 252b + 7c$$ $$\frac{B^2 + B + 1}{7} = 1296a + 36b + c$$

To find the values of $B$, use casework for values of $a$ since $a$ has the most influence on the value of $7(1296a + 36b + c) - 1$. Casework will be heavy, but a few tips can lighten the load. First, since $B^2 + B$ is one less than a multiple of $7$, $B$ is congruent to $2$ or $4$ modulo $7$. Second, once $\frac{B^2 + B + 1}{7} > 1296a + 185$, $B$ can not be higher for a given $a$. Third, use estimation to approximate the lower bound for a given $a$.

• If $a = 1$, then $B^2 + B$ is just more than $9072$. The first few values of $B$ that work are $95$, $100$, $102$, and $107$. Testing each case, $B = 100$ when $b = 4$ and $c = 3$.
• If $a = 2$, then $B^2 + B$ is just more than $18144$. The first few values of $B$ that work are $137$, $142$, $144$. Testing each case, $B = 137$ when $b = 3$ and $c = 1$.
• If $a = 3$, then $B^2 + B$ is just more than $27216$. The first few values of $B$ that work are $165$ and $170$. After testing each case, no values of $B$ work when $a = 3$.
• If $a = 4$, then $B^2 + B$ is just more than $36288$. The first few values of $B$ that work are $191$ and $193$. After testing each case, once again, no values of $B$ work when $a = 4$.
• If $a = 5$, then $B^2 + B$ is just more than $45360$. The first few values of $B$ that work are $214$ and $219$. After testing each case, yet again, no values of $B$ work when $a = 5$.

In summary, the only possible values of $B$ are $100$ and $137$, and the sum of the values equals $\boxed{237}$.