# Difference between revisions of "2018 AMC 10A Problems/Problem 25"

## Problem

For a positive integer $n$ and nonzero digits $a$, $b$, and $c$, let $A_n$ be the $n$-digit integer each of whose digits is equal to $a$; let $B_n$ be the $n$-digit integer each of whose digits is equal to $b$, and let $C_n$ be the $2n$-digit (not $n$-digit) integer each of whose digits is equal to $c$. What is the greatest possible value of $a + b + c$ for which there are at least two values of $n$ such that $C_n - B_n = A_n^2$?

$\textbf{(A)} \text{ 12} \qquad \textbf{(B)} \text{ 14} \qquad \textbf{(C)} \text{ 16} \qquad \textbf{(D)} \text{ 18} \qquad \textbf{(E)} \text{ 20}$

## Solution

Observe $A_n = a(1 + 10 + \dots + 10^{n - 1}) = a \cdot \tfrac{10^n - 1}{9}$; similarly $B_n = b \cdot \tfrac{10^n - 1}{9}$ and $C_n = c \cdot \tfrac{10^{2n} - 1}{9}$. The relation $C_n - B_n = A_n^2$ rewrites as $$c \cdot \frac{10^{2n} - 1}{9} - b \cdot \frac{10^n - 1}{9} = a^2 \cdot \left(\frac{10^n - 1}{9}\right)^2.$$Since $n > 0$, $10^n > 1$ and we may cancel out a factor of $\tfrac{10^n - 1}{9}$ to obtain $$c \cdot (10^n + 1) - b = a^2 \cdot \frac{10^n - 1}{9}.$$This is a linear equation in $10^n$. Thus, if two distinct values of $n$ satisfy it, then all values of $n$ will. Matching coefficients, we need $$c = \frac{a^2}{9} \quad \text{and} \quad c - b = -\frac{a^2}{9} \implies b = \frac{2a^2}{9}.$$To maximize $a + b + c = a + \tfrac{a^2}{3}$, we need to maximize $a$. Since $b$ and $c$ must be integers, $a$ must be a multiple of 3. If $a = 9$ then $b$ exceeds 9. However, if $a = 6$ then $b = 8$ and $c = 4$ for an answer of $\boxed{\textbf{(D)} \text{ 18}}$. (CantonMathGuy)