2026 AIME II Problem 13

Below is the professionally curated solution for Problem 13 of the 2026 AIME II, from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 2026 AIME II solutions, or check the answer key.

All of the real AMC 8, AMC 10, AMC 12, and AIME problems in our complete solution collection are used with official legal permission of the Mathematical Association of America (MAA).

Concepts:bijectionprime factorizationoptimization

Difficulty rating: 3370

13.

Call finite sets of integers SS and TT cousins if

SS and TT have the same number of elements,

SS and TT are disjoint, and

• the elements of SS can be paired with the elements of TT so that the elements in each pair differ by exactly 1.1.

For example, {1,2,5}\{1, 2, 5\} and {0,3,4}\{0, 3, 4\} are cousins. Suppose that the set SS has exactly 40404040 cousins. Find the least number of elements the set SS can have.

Solution:

A cousin TT is the image of an injection sending each xSx \in S to x1x - 1 or x+1,x + 1, landing outside S.S. If x1,x,x+1Sx - 1, x, x + 1 \in S then xx has nowhere to go, so every maximal block of consecutive elements of SS has size 11 or 2.2. A double block {a,a+1}\{a, a+1\} is forced to map to {a1,a+2},\{a - 1, a + 2\}, while a singleton {a}\{a\} chooses a1a - 1 or a+1.a + 1. Two blocks can fight over a value only when exactly one integer separates them, so group blocks into chains: consecutive blocks with gaps of exactly one. Within a chain the only consistent patterns are "the first ii blocks shift left and the rest shift right," since a block choosing right and its successor choosing left would collide; a double block acts as both left and right, forcing the switch to happen exactly at it. Hence a chain of kk singletons produces k+1k + 1 distinct images, a chain containing one double produces exactly 1,1, and a chain with two doubles produces 0.0. Distinct patterns give distinct sets T,T, and choices in different chains are independent, so the number of cousins is the product of (ki+1)(k_i + 1) over the all-singleton chains.

We need (ki+1)=4040=235101\prod (k_i + 1) = 4040 = 2^3 \cdot 5 \cdot 101 while minimizing the element count ki\sum k_i (chains with doubles only waste elements). Replacing a composite factor f=ghf = gh with the two factors g,h2g, h \ge 2 strictly lowers the cost, because (g1)+(h1)<gh1.(g - 1) + (h - 1) \lt gh - 1. So the optimum uses the prime factorization: (f1)=1+1+1+4+100=107,\sum (f - 1) = 1 + 1 + 1 + 4 + 100 = 107, realized by five chains of 1,1,1,4,1001, 1, 1, 4, 100 singletons — runs of every-other integer — placed far apart.

The least possible number of elements is 107.107.

← Problem 12Full ExamProblem 14

Problem 13 in Other Years