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.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)
- 2.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)
- 3.2018 AMC 10A #18
How many nonnegative integers can be written in the form where for ?
- A)
- B)
- C)
- D)
- E)
- 4.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)
- 5.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)
- 6.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)
- 7.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)
- 8.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)
- 9.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)
- 10.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)
- 11.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)
- 12.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)
- 13.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)
- 14.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)
- 15.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)
- 16.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)
- 17.2020 AMC 10A #21
There exists a unique strictly increasing sequence of nonnegative integers such that What is
- A)
- B)
- C)
- D)
- E)
- 18.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)
- 19.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)
- 20.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)
Answers
| # | Answer | The idea it turns on |
|---|---|---|
| 1 | 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. |
| 2 | 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. |
| 3 | 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. |
| 4 | 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. |
| 5 | 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. |
| 6 | 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. |
| 7 | D | Reversing a 3-digit number changes it by 99 times (c - a). That must equal 55 times the hours, forcing c - a = 5. |
| 8 | 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. |
| 9 | 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. |
| 10 | C | The last digit in base b is the remainder after dividing by b, so b divides 2010 and must be bigger than 3. |
| 11 | D | For numbers 1bcd, the last digit is 1 + b + c, so b + c is at most 8: that gives 45 numbers. Add 2002. |
| 12 | 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. |
| 13 | 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. |
| 14 | 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. |
| 15 | 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. |
| 16 | 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. |
| 17 | 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. |
| 18 | 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. |
| 19 | 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. |
| 20 | 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. |
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.