AMC 10 Step by Step

2022 AMC 10B Problem 6

P1-10~3 minPrint

How many of the first ten numbers of the sequence 121,11211,1112111,…121, 11211, 1112111, \ldots are prime numbers?

Log in to save your progress.
Show solution without answering

Key insight

Every term is a product: 121 = 11 × 11, 11211 = 111 × 101, 1112111 = 1111 × 1001. The pattern never stops, so no term is prime.

Solution

Testing big numbers like 11121111112111 for primality by hand is hopeless, so look for a pattern in how the terms are built.

1. Try to factor the first few terms.
121=11×11,11211=111×101,1112111=1111×1001.121 = 11 \times 11, \qquad 11211 = 111 \times 101, \qquad 1112111 = 1111 \times 1001.
Each term is "a number made of ones" times "a 11, some zeros, and a 11".
2. See why the multiplication works. Take 111×101111 \times 101. Multiplying by 101101 means adding 111×100111 \times 100 and 111×1111 \times 1:
11100+    11111211\begin{array}{r} 11100 \\ +\ \ \ \ 111 \\ \hline 11211 \end{array}
The two copies of 111111 are shifted and overlap in just one column, where 1+1=21 + 1 = 2. Every other column has a single 11.
3. It works for every term. The term with a block of ones on each side of the 22 equals (one more 11 than that block) times (11, then zeros, then 11). For example, the 4th term 111121111=11111×10001111121111 = 11111 \times 10001. The same overlapping-by-one-column addition gives it every time.
4. So no term is prime. Both factors are bigger than 11 in every case, so each term is a product of two smaller whole numbers. None of the first ten terms is prime.

The answer is (A) 0\boxed{\textbf{(A)}\ 0}.

Why this works

A number described by its digit pattern usually has a simple multiplication hiding behind it. Here, the single 22 in the middle is the mark left when two shifted copies of 111…1111\ldots1 are added and overlap in one column. Factoring the first two or three terms and then explaining the pattern is much faster and safer than testing big numbers for primes.

Alternative approach

With algebra: let a=10na = 10^n, where nn is the number of ones on each side of the 22. The term equals 111…1111\ldots1 (with 2n+12n+1 ones) plus aa, because adding aa turns the middle 11 into a 22. The number with 2n+12n+1 ones is 10a2−19\frac{10a^2 - 1}{9}, so the term is
10a2−19+a=10a2+9a−19=(10a−1)(a+1)9.\frac{10a^2 - 1}{9} + a = \frac{10a^2 + 9a - 1}{9} = \frac{(10a - 1)(a + 1)}{9}.
Here 10a−19\frac{10a - 1}{9} is the number made of n+1n + 1 ones and a+1=10n+1a + 1 = 10^n + 1, which is the same factoring as above.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

The nnth term consists of nn ones, a 22, and nn more ones. Try to factor the first few:
121=11⋅11,11211=111⋅101,1112111=1111⋅1001.121 = 11 \cdot 11,\qquad 11211 = 111 \cdot 101,\qquad 1112111 = 1111 \cdot 1001.

This pattern always holds. Let RR be the number made of n+1n+1 ones. Then
R⋅(10n+1)=R⋅10n+R.R \cdot (10^n + 1) = R \cdot 10^n + R.
The first summand is n+1n+1 ones followed by nn zeros; the second is n+1n+1 ones. When added, they overlap in exactly one digit position (the (n+1)(n+1)st from the right), which becomes 1+1=21 + 1 = 2, and every other position gets a single 11. The result is nn ones, a 22, and nn ones: precisely the nnth term.

Both factors RR and 10n+110^n + 1 exceed 11, so every term is composite. None of the first ten (or of any) terms is prime.

The answer is (A) 0\boxed{\textbf{(A)}\ 0}.

Review in the AoPS books

Similar problems

Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.