Overview
We normally write numbers in base , using ten digits through . But there is nothing special about ten. Any positive integer can serve as a base, and understanding how bases work opens up a family of techniques that appear regularly on the AMC, AIME, etc.
The main idea is that a number's representation in base directly encodes its remainders and quotients when divided by powers of . This connects base representations to modular arithmetic.
What Is a Base?
In base , we write a number using digits and place values that are powers of .
The base representation
stands for the value
Each digit satisfies .
For example, in base :
In base (binary):
Common Bases
A few bases come up often in competition math:
- Base (binary): digits are and . Useful in combinatorics and problems about subsets.
- Base (ternary): digits are . Appears in balanced ternary and weighing problems.
- Base (octal) and base (hexadecimal): occasionally appear in digit manipulation problems.
However, contest problems can use any base, including large or variable ones.
Converting Base to Base
Expand using the definition:
Another example:
where represents the digit in hexadecimal.
Converting Base to Base
Repeatedly divide by and record the remainders. The remainders, read from bottom to top, give the base digits.
Convert to base :
Reading the remainders from bottom to top: .
We can verify: .
The Last Digit Rule
This is one of the most useful facts about bases in competition math:
The last digit of in base is the remainder when is divided by .
In symbols,
where is the units digit of the base representation of .
This follows directly from the expansion, every term except is a multiple of .
Similarly, the last two digits of in base encode , and so on.
The Digit Sum and Casting Out
In base , we know a number is divisible by when its digit sum is divisible by . This generalises:
In base , a number is divisible by if and only if the sum of its base- digits is divisible by .
This is because , so every power , and therefore
Counting Digits
A positive integer has exactly digits in base if and only if
Equivalently,
For example, in base has digits, since .
Worked Examples
Example 1
Convert to base .
Reading remainders bottom to top: .
Check: .
Example 2 (2013 AMC 10A Problem 19)
In base , the number ends in the digit . In base , the same number is written as and ends in the digit . For how many positive integers does the base- representation of end in the digit ?
By the last digit rule, the base- representation of ends in if and only if
This means . We also need since the digit must be a valid digit in base (digits go from to , so ).
Now . The number of positive divisors of is . Three of these divisors () are less than , so the answer is .
Example 3
What is the sum of the digits of in base ?
First convert, , then , then , then .
So .
The digit sum is .
Key Contest Insight
The connection between bases and modular arithmetic is the single most important idea:
- The last digit of in base equals .
- The last digits of in base encode .
- The digit sum in base relates to .
Whenever a problem mentions a specific base, ask yourself what modular information the base representation is encoding.
Strategy Tips
- When a problem asks about a number's representation in an unknown base , translate digit conditions into divisibility or modular conditions on .
- To count integers whose base digits satisfy some restriction, think of each digit position as an independent choice (possibly with constraints on the leading digit).
- Base representations connect naturally to subsets, each subset of corresponds to an digit binary string.
- If a problem involves both base and base , rewrite everything in base to find common ground, then work modularly.
Common Pitfalls
- Forgetting that digits in base must satisfy . The digit does not exist in base .
- Reading remainders in the wrong order when converting from base to base . Remainders are read bottom to top.
- Confusing 'the number in base ' (which equals in base ) with 'the number converted to base .'
- Assuming a number has the same number of digits in every base.
Practice Problems
| Status | Source | Problem Name | Difficulty | Tags | ||
|---|---|---|---|---|---|---|
Module Progress:
Join the Discord Community!
Stuck on a problem, or don't understand a module? Join the Discord and get help with your doubts while making more math friends.
