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 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)
- 12.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)
- 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)
- 21.2019 AMC 10A #18
For some positive integer , the repeating base- representation of the (base-ten) fraction is . What is ?
- A)
- B)
- C)
- D)
- E)
- 22.2019 AMC 10B #12
What is the greatest possible sum of the digits in the base-seven representation of a positive integer less than ?
- A)
- B)
- C)
- D)
- E)
- 23.2018 AMC 10A #18
How many nonnegative integers can be written in the form where for ?
- A)
- B)
- C)
- D)
- E)
- 24.2017 AMC 10B #16
How many of the base-ten numerals for the positive integers less than or equal to contain the digit ?
- A)
- B)
- C)
- D)
- E)
- 25.2017 AMC 10A #20
Let equal the sum of the digits of positive integer . For example, . For a particular positive integer , . Which of the following could be the value of ?
- A)
- B)
- C)
- D)
- E)
- 26.2015 AMC 10A #18
Hexadecimal (base-16) numbers are written using numeric digits through as well as the letters through to represent through . Among the first positive integers, there are whose hexadecimal representation contains only numeric digits. What is the sum of the digits of ?
- A)
- B)
- C)
- D)
- E)
- 27.2014 AMC 10B #14
Danica drove her new car on a trip for a whole number of hours, averaging miles per hour. At the beginning of the trip, miles was displayed on the odometer, where is a 3-digit number with and . At the end of the trip, the odometer showed miles. What is ?
- A)
- B)
- C)
- D)
- E)
- 28.2014 AMC 10B #10
In the addition shown below and are distinct digits. How many different values are possible for ?
- A)
- B)
- C)
- D)
- E)
- 29.2014 AMC 10A #20
The product , where the second factor has digits, is an integer whose digits have a sum of . What is ?
- A)
- B)
- C)
- D)
- E)
- 30.2013 AMC 10A #19
In base , the number ends in the digit . In base , on the other hand, 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 ?
- A)
- B)
- C)
- D)
- E)
- 31.2013 AMC 10B #18
The number has the property that its units digit is the sum of its other digits, that is . How many integers less than but greater than share this property?
- A)
- B)
- C)
- D)
- E)
- 32.2010 AMC 10B #21
A palindrome between and is chosen at random. What is the probability that it is divisible by ?
- A)
- B)
- C)
- D)
- E)
- 33.2005 AMC 10A #14
How many three-digit numbers satisfy the property that the middle digit is the average of the first and the last digits?
- A)
- B)
- C)
- D)
- E)
- 34.2004 AMC 10B #17
The two digits in Jack's age are the same as the digits in Bill's age, but in reverse order. In five years Jack will be twice as old as Bill will be then. What is the difference in their current ages?
- A)
- B)
- C)
- D)
- E)
- 35.2003 AMC 10A #20
A base-10 three digit number is selected at random. Which of the following is closest to the probability that the base-9 representation and the base-11 representation of are both three-digit numerals?
- A)
- B)
- C)
- D)
- E)
- 36.2024 AMC 10A #18
There are exactly positive integers such that the base- integer is divisible by (where is in base ten). What is the sum of the digits of ?
- A)
- B)
- C)
- D)
- E)
- 37.2020 AMC 10A #21
There exists a unique strictly increasing sequence of nonnegative integers such that What is
- A)
- B)
- C)
- D)
- E)
- 38.2016 AMC 10B #24
How many four-digit integers , with , have the property that the three two-digit integers form an increasing arithmetic sequence? One such number is , where , , , and .
- A)
- B)
- C)
- D)
- E)
- 39.2007 AMC 10B #24
Let denote the smallest positive integer that is divisible by both and and whose base- representation consists of only 's and 's, with at least one of each. What are the last four digits of
- A)
- B)
- C)
- D)
- E)
- 40.2007 AMC 10A #25
For each positive integer , let denote the sum of the digits of For how many values of is
- A)
- B)
- C)
- D)
- E)
- 41.2007 AMC 10A #22
A finite sequence of three-digit integers has the property that the tens and units digits of each term are, respectively, the hundreds and tens digits of the next term, and the tens and units digits of the last term are, respectively, the hundreds and tens digits of the first term. For example, such a sequence might begin with the terms 247, 475, and 756 and end with the term 824. Let be the sum of all the terms in the sequence. What is the largest prime factor that always divides ?
- A)
- B)
- C)
- D)
- E)
- 42.2018 AMC 10A #25
For a positive integer and nonzero digits , , and , let be the -digit integer each of whose digits is equal to ; let be the -digit integer each of whose digits is equal to , and let be the -digit (not -digit) integer each of whose digits is equal to . What is the greatest possible value of for which there are at least two values of such that ?
- A)
- B)
- C)
- D)
- E)
- 43.2013 AMC 10B #25
Bernardo chooses a three-digit positive integer and writes both its base-5 and base-6 representations on a blackboard. Later LeRoy sees the two numbers Bernardo has written. Treating the two numbers as base-10 integers, he adds them to obtain an integer . For example, if , Bernardo writes the numbers and , and LeRoy obtains the sum . For how many choices of are the two rightmost digits of , in order, the same as those of ?
- A)
- B)
- C)
- D)
- E)
Answers
| # | Answer | The idea it turns on |
|---|---|---|
| 1 | D | Erasing the final 0 of a number divides it by 10. So the two numbers are 10 times n and n, which add up to 11 times n. |
| 2 | E | Each of the digits 1, 2, 3, 4 shows up exactly once in every column, so every column adds to 10 and the total is 10 times 1111. |
| 3 | B | Undo the steps from the end. Switched back, the result was 17, 27, 37, 47 or 57, and only 47 = 3 times 12 plus 11 works. |
| 4 | E | Squaring 11, 111 and 1111 gives 121, 12321 and 1234321; the digits climb to the number of ones and come back down, with no carrying up to nine ones. |
| 5 | E | Make the hour digits and the minute digits as big as possible separately. The hour 9 beats 10, 11 and 12, and the minutes can be 59. |
| 6 | A | Every number made of nines is 9 times a number made of ones. So the mean is 1 + 11 + 111 + ... + 111111111, which is 123456789. |
| 7 | A | Write both numbers in ordinary place value: 7a + b = 9b + a. This simplifies to 3a = 4b, and a digit in base seven is at most 6. |
| 8 | E | Write both numbers using powers of b. Their difference is 2 × b × b × (b - 1), a multiple of 3 whenever b or b - 1 is. |
| 9 | B | Write the number as 10a + b. Cuddly means 9a = b(b - 1). Checking all ten units digits, only b = 9, a = 8 works. |
| 10 | B | A palindrome is fixed by its first three digits. After 159 comes 160, so the next palindrome is 16061, which is 110 miles later. |
| 11 | D | A 2 turned into 1 costs 1 in the ones place and 10 in the tens place. Count the 2s in each place separately. |
| 12 | B | The hundreds digits differ and are not zero, so S is at least 300. Digit sums 1 to 3 fail, and 143 + 257 = 400 gives 4. |
| 13 | B | The number is aba with a not 5. Small a allows every middle digit b; for a from 6 to 9, b must be below 20 - 2a. |
| 14 | E | A three-digit number plus 32 has four digits only if the number is at least 968. That leaves 969, 979, 989, 999, and only 969 + 32 = 1001 works. |
| 15 | D | A two-digit number minus its digit sum is 9 times the tens digit. Only 36 ends in 6, so the tens digit is 4 and the units digit is free. |
| 16 | E | A two-digit number's digits add to at most 18, and only 3 and 12 in that range have digit sum 3. Count both cases. |
| 17 | E | Both numbers start with the same three digits AMC. Written as place values, the sum is twice AMC hundreds, plus 10 plus 12, which gives AMC = 617. |
| 18 | E | Write the number as 10 times the tens digit plus the units digit. The units digit cancels, and what is left forces it to be 9. |
| 19 | E | The year 2023 already has one 0 and one 3. So the month and day together must use one 0, one 3, and two copies of some other digit. |
| 20 | B | Both base-n numbers start 3n² + 2n. Subtracting the two equations cancels that part and gives d = 2, and then 3n² + 2n = 261 gives n = 9. |
| 21 | D | In base ten 0.2323... is 23/99; in base k it is (2k + 3) over (k squared minus 1). So 51 must divide k squared minus 1. |
| 22 | C | Numbers below 2019 have at most four base-7 digits, each at most 6. Check whether the smallest number with each high digit sum still fits under 2019. |
| 23 | D | Digits -1, 0, 1 with powers of 3 make every whole number from -3280 to 3280 exactly once; the nonnegative ones are 0 through 3280. |
| 24 | A | Count the numbers with no 0, where every digit is 1 to 9: 9 + 81 + 729 + 729 = 1548. The other 469 contain a 0. |
| 25 | D | Adding 1 raises the digit sum by 1, but each 9 that turns into 0 takes away 9. So the new digit sum is 1275 minus a multiple of 9. |
| 26 | E | In base 16, 1000 is 3E8. Every three-digit string of digits 0 to 9 starting with 0 to 3 is below it: 400 strings, minus zero. |
| 27 | D | Reversing a 3-digit number changes it by 99 times (c - a). That must equal 55 times the hours, forcing c - a = 5. |
| 28 | C | Columns where the answer digit repeats an added digit force C = 0 and no carrying, so D = A + B for different nonzero digits A and B. |
| 29 | D | Work out 8 times 88, 888, 8888. The answer is always a 7, then a run of ones, then 04, so the digit sum is k + 9. |
| 30 | C | The last digit in base b is the remainder after dividing by b, so b divides 2010 and must be bigger than 3. |
| 31 | D | For numbers 1bcd, the last digit is 1 + b + c, so b + c is at most 8: that gives 45 numbers. Add 2002. |
| 32 | E | A palindrome abba equals 1001a + 110b. 1001 is a multiple of 7, so only the middle digit b matters, and b must be 0 or 7. |
| 33 | E | The middle digit is decided by the other two, and it is a whole number only when the first and last digits are both odd or both even. |
| 34 | B | Write the ages as 10a + b and 10b + a. The five-years rule becomes 8a = 19b + 5, and only a = 3, b = 1 works. |
| 35 | E | Three digits in base 9 means 81 to 728; in base 11, 121 to 1330. Both hold from 121 to 728: 608 of the 900 numbers. |
| 36 | D | In base b, 2024 means 2(b³ + b + 2). So b³ + b + 2 must be a multiple of 8, which depends only on b's remainder mod 8. |
| 37 | C | Let x be 2 to the 17th. The fraction becomes x^16 - x^15 + ... + 1, and each pair like x^16 - x^15 is seventeen ones in binary. |
| 38 | D | The digit b is the ones digit of ab and the tens digit of bc. Adding column by column shows the common difference is 11p or 11p + 1. |
| 39 | C | A multiple of 4 must end in 44; a multiple of 9 needs the number of 4's to be a multiple of 9. Use nine 4's and one 9. |
| 40 | D | Digit sums are small, so n must be between 1969 and 2007. A remainder argument with 9 shows n is a multiple of 3, leaving 13 numbers to test. |
| 41 | D | The digits wrap around, so each digit appears once as a hundreds, once as a tens and once as a ones digit. The sum is 111 times the digit total. |
| 42 | D | Using R = 11...1, the equation becomes (9c minus a squared) times R = b minus 2c. Two values of n force both sides to be 0. |
| 43 | E | The last digits in base 5 and base 6 must match, so N is 30m plus a remainder from 0 to 4. The tens digits then depend only on m. |
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.