AMC 10 Step by Step
Printable problems

Bases & Digits

Non-decimal bases, digit manipulation, digit sums, palindromes

What you need to know

  • What the digits mean. In base bb, the places stand for 1,b,b2,b3,…1, b, b^2, b^3, \dots from right to left. So the digits dk…d1d0d_k \dots d_1 d_0 mean dkbk+⋯+d1b+d0d_k b^k+\dots+d_1 b+d_0. Each digit is a whole number from 00 to b−1b-1, and the first digit is not 00. Example: 12034=1⋅64+2⋅16+0⋅4+3=991203_4 = 1\cdot64+2\cdot16+0\cdot4+3 = 99.
  • How many digits. A positive whole number NN has exactly kk digits in base bb exactly when bk−1≤N<bkb^{k-1} \le N < b^k. Example: the 55-digit numbers in base 22 are 1616 through 3131, since 24=162^4 = 16 and 25=322^5 = 32.
  • Converting to base bb. Divide by bb again and again; the remainders, read from last to first, are the digits. Or take away the largest power of bb that fits, as often as it fits, and repeat with smaller powers. Example: 50=16⋅3+250 = 16\cdot3+2, 16=5⋅3+116 = 5\cdot3+1, 5=1⋅3+25 = 1\cdot3+2, 1=0⋅3+11 = 0\cdot3+1, so 50=1212350 = 1212_3.
  • Base-1010 numbers with letters. A two-digit number with digits aa and bb is 10a+b10a+b (here bb is a digit, not a base); a three-digit one is 100a+10b+c100a+10b+c. Reversing 10a+b10a+b gives 10b+a10b+a, and the difference is 9(a−b)9(a-b), always a multiple of 99. Example: 72−27=45=9⋅572-27 = 45 = 9\cdot5.
  • The digit-sum trick. A number and its digit sum leave the same remainder when divided by 99. We write N≡(digit sum)(mod9)N \equiv (\text{digit sum}) \pmod 9, where "(mod9)\pmod 9" means we compare remainders after dividing by 99. In base bb, use b−1b-1 instead of 99. Example: 12341234 and 1+2+3+4=101+2+3+4 = 10 both leave remainder 11. In base 55, 2135=58213_5 = 58 and 2+1+3=62+1+3 = 6 both leave remainder 22 when divided by 44.
  • Palindromes. A palindrome reads the same both ways. A four-digit palindrome with digits a,b,b,aa, b, b, a equals 1001a+110b1001a+110b. Since 1001=11⋅911001 = 11\cdot91 and 110=11⋅10110 = 11\cdot10, it is always divisible by 1111. Example: 3443=11⋅3133443 = 11\cdot313.

How AMC 10 tests it

  • "NN is written one way in base bb and another way in base b+1b+1 (or base 1010); find bb or NN." Write each form as a polynomial in bb 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 10a+b10a+b and solve.
  • Counting palindromes, or numbers with a digit property, in a range, sometimes in base 22 or 33 (problems 12–20).
  • Digits of powers or factorials in another base, such as how many zeros n!n! ends with in base 1212. Since 12=22⋅312 = 2^2\cdot3, each zero uses up two 22s and one 33: count the 22s and 33s in n!n!, halve the count of 22s (rounding down), and take the smaller number. Example: 9!9! has seven 22s and four 33s, so it ends in the smaller of 33 and 44, which is 33 zeros in base 1212.

Standard approaches

  1. Turn every digit string into algebra at once. The base becomes an unknown whole number with limits on it.
  2. Use bk−1≤N<bkb^{k-1} \le N < b^k to narrow down bb before solving anything.
  3. Look at remainders after dividing by 99, b−1b-1, or 1111 to rule out cases quickly.
  4. To count numbers, build them digit by digit and multiply the choices. Treat the first digit separately, since it can't be 00.
  5. When the bases are small, convert and look. A table of small powers of 22 and 33 beats theory.

Worked example

When 20242024 is written in base bb, it has exactly three digits and its last digit is 00. How many possible values of bb are there?

(A) 11 (B) 22 (C) 33 (D) 44 (E) 55

Step 1: three digits. We need b2≤2024<b3b^2 \le 2024 < b^3.

Step 2: limits on bb. Since 123=172812^3 = 1728 is less than 20242024 and 133=219713^3 = 2197 is more, b≥13b \ge 13. Since 442=1936≤202444^2 = 1936 \le 2024 but 452=202545^2 = 2025, b≤44b \le 44.

Step 3: last digit 00. The last digit is the remainder when 20242024 is divided by bb. It is 00 exactly when bb divides 20242024.

Step 4: count. 2024=23⋅11⋅232024 = 2^3\cdot11\cdot23 has divisors 1,2,4,8,11,22,23,44,46,…1, 2, 4, 8, 11, 22, 23, 44, 46, \dots. The ones from 1313 to 4444 are 2222, 2323, and 4444. For example, 2024=4⋅222+4⋅22+0=440222024 = 4\cdot22^2+4\cdot22+0 = 440_{22}.

The answer is (C) 3\boxed{\textbf{(C)}\ 3}.

Pitfalls

  • Allowing a digit that is bb or more, or a first digit of 00; either makes a "solution" invalid. Example: if you get b=4b = 4 for a number written 352b352_b, throw it out: base 44 has no digit 55.
  • Reading the remainders in the wrong order: the first remainder is the last (units) digit. Example: 5050 in base 33 gives remainders 2,1,2,12, 1, 2, 1; written in that order, 21213=702121_3 = 70, not 5050.
  • Mixing up "exactly three digits" with "at most three digits." "At most" drops b2≤Nb^2 \le N, which is what puts an upper limit on bb. Example: base 4646 writes 20242024 with only two digits, so it must not count above.
  • Assuming base-1010 digit facts work in every base. The digit-sum test for 33 works only because 1010 leaves remainder 11 when divided by 33. Example: 128=1012_8 = 10 has digit sum 33, but 1010 is not divisible by 33.

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)

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.