Patterns & Reasoning

Depth · one concept from first principles · step 2 of 4

Repeated digit pair always divisible by 3

The digits A and B alternate to make the six-digit number ABABAB. Find the smallest prime that divides it for every allowed choice of A and B.
OperationsExpressions
Your answer
How to solve
Strategy Convert to Algebra — Test the primes in order, starting from 2. A single example is enough to knock a prime out; to keep a prime, write the digit sum with letters so it covers every case at once.
1STEP 1

Test the prime 2

The ones digit of ABABAB is B. If B is odd, the number is odd. For example, A = 2, B = 1 gives 212121.

212121 ends in 1 → odd
2STEP 2

Add the digits with letters

The digits are A, B, A, B, A, B. Their sum is three copies of A + B.

A + B + A + B + A + B = 3(A + B)
3STEP 3

Pick the smallest prime

2 fails for some choices, and 3 works for all of them. No prime is smaller than 2, so the smallest prime that always works is 3.

2 fails, 3 always works
Answer
3
Try A = 2, B = 1: 212121 ÷ 3 = 70707, a whole number, while 212121 is odd. Both facts match.
Takeaway

One counterexample knocks a prime out; a letter expression proves one works every time.

  • Test the prime 2
  • Add the digits with letters
  • Pick the smallest prime
Where next?

A parent dashboard for the family lives at sensimlab.com.

The same shape shows up later on the AMC, as Small-Domain Constrained Search. Why the shapes repeat →