Bases & Digits
Non-decimal bases, digit manipulation, digit sums, palindromes
What you need to know
- What the digits mean. In base , the places stand for from right to left. So the digits mean . Each digit is a whole number from to , and the first digit is not . Example: .
- How many digits. A positive whole number has exactly digits in base exactly when . Example: the -digit numbers in base are through , since and .
- Converting to base . Divide by again and again; the remainders, read from last to first, are the digits. Or take away the largest power of that fits, as often as it fits, and repeat with smaller powers. Example: , , , , so .
- Base- numbers with letters. A two-digit number with digits and is (here is a digit, not a base); a three-digit one is . Reversing gives , and the difference is , always a multiple of . Example: .
- The digit-sum trick. A number and its digit sum leave the same remainder when divided by . We write , where "" means we compare remainders after dividing by . In base , use instead of . Example: and both leave remainder . In base , and both leave remainder when divided by .
- Palindromes. A palindrome reads the same both ways. A four-digit palindrome with digits equals . Since and , it is always divisible by . Example: .
How AMC 10 tests it
- " is written one way in base and another way in base (or base ); find or ." Write each form as a polynomial in and solve (problems 10–18).
- Digit puzzles: a number equals the product of its digits plus their sum, or reversing its digits multiplies it by a fixed number. Write it as and solve.
- Counting palindromes, or numbers with a digit property, in a range, sometimes in base or (problems 12–20).
- Digits of powers or factorials in another base, such as how many zeros ends with in base . Since , each zero uses up two s and one : count the s and s in , halve the count of s (rounding down), and take the smaller number. Example: has seven s and four s, so it ends in the smaller of and , which is zeros in base .
Standard approaches
- Turn every digit string into algebra at once. The base becomes an unknown whole number with limits on it.
- Use to narrow down before solving anything.
- Look at remainders after dividing by , , or to rule out cases quickly.
- To count numbers, build them digit by digit and multiply the choices. Treat the first digit separately, since it can't be .
- When the bases are small, convert and look. A table of small powers of and beats theory.
Worked example
When is written in base , it has exactly three digits and its last digit is . How many possible values of are there?
(A) (B) (C) (D) (E)
Step 1: three digits. We need .
Step 2: limits on . Since is less than and is more, . Since but , .
Step 3: last digit . The last digit is the remainder when is divided by . It is exactly when divides .
Step 4: count. has divisors . The ones from to are , , and . For example, .
The answer is .
Pitfalls
- Allowing a digit that is or more, or a first digit of ; either makes a "solution" invalid. Example: if you get for a number written , throw it out: base has no digit .
- Reading the remainders in the wrong order: the first remainder is the last (units) digit. Example: in base gives remainders ; written in that order, , not .
- Mixing up "exactly three digits" with "at most three digits." "At most" drops , which is what puts an upper limit on . Example: base writes with only two digits, so it must not count above.
- Assuming base- digit facts work in every base. The digit-sum test for works only because leaves remainder when divided by . Example: has digit sum , but is not divisible by .
Traps that recur
- Testing n = 1 alone (which yields many digit triples) or using C_n with n digits instead of 2n digits. (2018 AMC 10A #25)
- Treating the base-5 and base-6 strings as base-10 numbers without separating the units-digit condition from the tens-digit condition, or forgetting carries are impossible here. (2013 AMC 10B #25)
- Forgetting to drop b = 3 (below the required b ≥ 5) from the residue class 3 mod 8, which gives K = 759 and digit sum 21. (2024 AMC 10A #18)
- Counting the 17 alternating terms as 17 powers of two, or getting 8 * 17 = 136 and forgetting the final +1. (2020 AMC 10A #21)
- 1.2021 AMC 10A #3
The sum of two natural numbers is . One of the two numbers is divisible by . If the units digit of that number is erased, the other number is obtained. What is the difference of these two numbers?
- A)
- B)
- C)
- D)
- E)
- 2.2021 AMC Fall 10B #1
What is the value of
- A)
- B)
- C)
- D)
- E)
- 3.2017 AMC 10B #1
Mary thought of a positive two-digit number. She multiplied it by and added . Then she switched the digits of the result, obtaining a number between and , inclusive. What was Mary's number?
- A)
- B)
- C)
- D)
- E)
- 4.2009 AMC 10A #5
What is the sum of the digits of the square of ?
- A)
- B)
- C)
- D)
- E)
- 5.2006 AMC 10A #4
A digital watch displays hours and minutes with AM and PM. What is the largest possible sum of the digits in the display?
- A)
- B)
- C)
- D)
- E)
- 6.2002 AMC 10B #3
The arithmetic mean of the nine numbers in the set is a -digit number , all of whose digits are distinct. The number doesn't contain the digit
- A)
- B)
- C)
- D)
- E)
- 7.2025 AMC 10B #4
The value of the two-digit number in base seven equals the value of the two-digit number in base nine. What is
- A)
- B)
- C)
- D)
- E)
- 8.2021 AMC 10A #11
For which of the following integers is the base- number not divisible by ?
- A)
- B)
- C)
- D)
- E)
- 9.2021 AMC Fall 10A #8
A two-digit positive integer is said to be if it is equal to the sum of its nonzero tens digit and the square of its units digit. How many two-digit positive integers are cuddly?
- A)
- B)
- C)
- D)
- E)
- 10.2020 AMC 10B #6
Driving along a highway, Megan noticed that her odometer showed (miles). This number is a palindrome-it reads the same forward and backward. Then hours later, the odometer displayed the next higher palindrome. What was her average speed, in miles per hour, during this -hour period?
- A)
- B)
- C)
- D)
- E)
- 11.2016 AMC 10B #6
Isaac added two three-digit positive integers. All six digits in these numbers are different. Isaac's sum is a three-digit number . What is the smallest possible value for the sum of the digits of ?
- A)
- B)
- C)
- D)
- E)
- 12.2016 AMC 10A #6
Ximena lists the whole numbers through once. Emilio copies Ximena's numbers, replacing each occurrence of the digit by the digit . Ximena adds her numbers and Emilio adds his numbers. How much larger is Ximena's sum than Emilio's?
- A)
- B)
- C)
- D)
- E)
- 13.2013 AMC 10A #13
How many three-digit numbers are not divisible by , have digits that sum to less than , and have the first digit equal to the third digit?
- A)
- B)
- C)
- D)
- E)
- 14.2010 AMC 10A #9
A palindrome, such as , is a number that remains the same when its digits are reversed. The numbers and are three-digit and four-digit palindromes, respectively. What is the sum of the digits of ?
- A)
- B)
- C)
- D)
- E)
- 15.2005 AMC 10A #16
The sum of the digits of a two-digit number is subtracted from the number. The units digit of the result is . How many two-digit numbers have this property?
- A)
- B)
- C)
- D)
- E)
- 16.2003 AMC 10B #13
Let denote the sum of the digits of the positive integer . For example, and . For how many two-digit values of is ?
- A)
- B)
- C)
- D)
- E)
- 17.2003 AMC 10A #11
The sum of the two 5-digit numbers and is . What is ?
- A)
- B)
- C)
- D)
- E)
- 18.2001 AMC 10 #6
Let and denote the product and the sum, respectively, of the digits of the integer . For example, and . Suppose is a two-digit number such that . What is the units digit of ?
- A)
- B)
- C)
- D)
- E)
- 19.2023 AMC 10A #9
A digital display shows the current date as an -digit integer consisting of a -digit year, followed by a -digit month, followed by a -digit date within the month. For example, Arbor Day this year is displayed as For how many dates in does each digit appear an even number of times in the -digital display for that date?
- A)
- B)
- C)
- D)
- E)
- 20.2021 AMC 10B #13
Let be a positive integer and be a digit such that the value of the numeral in base equals , and the value of the numeral in base equals the value of the numeral in base six. What is
- A)
- B)
- C)
- D)
- E)
Problems © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. The topic note, tags and key insights are original to this site.