Module 3.5 · Number Theory
Bases and digits
Base problems on the AMC 10 and 12 go well past converting numbers. You'll solve for an unknown base, test divisibility in another base, convert repeating "decimals" in base , count digits of enormous numbers, and untangle numbers whose digits are related in two different bases. All of it rests on one idea: a string of digits is a polynomial in the base.
Digits are a polynomial
in base means
When the base is unknown, this turns a digit equation into an ordinary polynomial equation in . Don't forget the hidden condition: every digit must be less than .
Divisibility in base
Since , every power of is , so a number is congruent to its digit sum modulo . Since , powers of alternate , so a number is congruent to its alternating digit sum (starting from the units digit) modulo . These are the base- versions of the tests for and .
Base-b facts
- in base equals , with each .
- Modulo , a number is congruent to its digit sum. Modulo , it is congruent to its alternating digit sum.
- A positive integer has digits in base exactly when .
- A repeating block in base equals .
The last fact works just like in base ten: multiplying by shifts one full block left, and subtracting the original cancels the tail.
Counting digits of huge numbers
To count base-ten digits of something like , pair up s and s into s: , which has digits. For powers of in base or , group the exponent: , which lies between and .
Worked example: Solving for the base
In some base , . Find .
, so and , which factors as . So . The largest digit used is , and , so this is valid. Check: , .
Worked example: A remainder in base 8
What is the remainder when is divided by ?
In base , a number is congruent to its digit sum modulo : . The remainder is . (Check: .)
Worked example: A repeating fraction in base 7
Write as a fraction in lowest terms.
The block repeats with length , so the value is .
Worked example: Digits of a power
How many digits does have when written in base ?
. So , and has digits in base : a followed by zeros.
Common mistake
After solving for a base, check the digits. The equation gives , so algebraically. But a base- number can't contain the digit , so no base works. Also, must be an integer greater than ; discard negative or fractional roots.
Practice
Write in base . (Enter the digits as a number.)
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
How many digits does have when written in base ten?
In some base , . Find .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
What is the remainder when the base-six number is divided by ?
When is written in base , it is a repeating fraction. What is it?
How many positive integers less than are palindromes when written in base ?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
A positive integer has three digits in base , and the same digits in reverse order, , in base . Find (in base ten).
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
What is the sum of the digits of (written in base ten)?
Real contest practice
- 2019 AMC 10A, Problem 18: find the base from a repeating base- fraction.
- 2025 AMC 12B, Problem 4: a number with related two-digit forms in base seven and base nine.
- 2013 AMC 12B Problems: look for the problem where Bernardo writes a number in base and base .