Learn the idea. Try it yourself.
Read the explanation or try 6 questions with hints. Free, untimed and no sign-in needed.
All lessons · Bangladesh study route
Your goal: Decide whether the player about to move can force a win in a counter-removal game. Find a first move, explain how to answer every legal reply, and prove why a pattern continues.
Preparation context: This original lesson develops game-strategy reasoning for Bangladesh regional preparation, with accessible starting problems and separately labelled proof extensions. It is suitable for Junior and Secondary learners who can use the prerequisites below. It is a topic lesson, not a full paper, an official syllabus or a prediction of a future question. Students from any country can use it.
The organiser-linked 2026 paper compilation includes a turn-taking strategy question in the Khulna/Sirajganj Primary regional set. That supports the topic choice; our rules and all problems here are newly written. The later proof work is an extension for learners ready to justify a strategy, rather than a claim that the regional entry round has the same demands as national finals or the international IMO.
Before you start: You need whole-number subtraction, division and remainders, and the distinction between “at least one” and “every” in mathematical language. The proof extension introduces an induction argument; strong induction is a useful follow-up, not a prerequisite for the first examples.
A manageable route: First try the three starting checks, read the rules and Examples 1–2, then attempt Problems 1–3. In a second sitting, study Examples 3–4 and Problems 4–6. Read the changed-ending rule in Example 5 before Problem 8. Allow about 25–35 minutes per sitting, with a separate 30–45 minutes for the proof problems. These are study suggestions, not exam time limits.
Three checks before playing
1. Remainders
Write 23 as a multiple of 4 plus a remainder. How many must be subtracted to reach the largest multiple of 4 below 23?
Answer and next step
We have 23 = 4 × 5 + 3. Subtract 3 to reach 20. The remainder must be one of 0, 1, 2 or 3. If you used 4 as a possible remainder, review division with remainder before continuing.
2. Legal moves
A pile has 2 counters. The allowed removals are 1, 3 or 4 counters. List every legal removal and the resulting pile.
Answer and next step
Only removing 1 is legal, leaving 1 counter. Removing 3 or 4 would require more counters than the pile contains. You cannot pass or remove a negative number. Always discard moves that are too large before analysing a position.
3. A choice versus a guarantee
A player has two legal moves. One lets the opponent force a win; the other guarantees the player a win. Can the player force a win?
Answer and next step
Yes. The player controls the choice and selects the successful move. A winning position needs at least one winning choice, not every choice. A losing position means that every legal choice lets a correctly playing opponent win.
A position belongs to the player about to move
Fix the rules before searching for a pattern
Two players take turns removing counters from one pile. An allowed move removes a positive number from a stated set. A player may not remove more counters than remain and may not pass. Unless a question explicitly changes the ending rule, a player with no legal move loses. In all the main games here, removing 1 is allowed, so this is equivalent to “the player who removes the last counter wins”. This is often called normal play.
A position is the number of counters immediately before a turn. We label it from the viewpoint of the player whose turn it is, not permanently from the viewpoint of the first player. A winning position (W) lets that player force a win, however the opponent replies. A losing position (L) does not: a correctly playing opponent can win against every choice.
“Losing” assumes that the opponent responds correctly. An opponent might make a mistake, but a proof of a guaranteed strategy cannot depend on one. Every move makes the pile smaller, so these games finish and there is no draw.
Start at the end, not at a large pile
In normal play, 0 is L: the player about to move has no legal move and loses. The player who has just removed the last counter has won. These are different players, so there is no contradiction.
The two classification rules
- If at least one legal move reaches L, the present position is W. Choose that move. The opponent then faces a losing position.
- If every legal move reaches W, the present position is L. Each choice gives the opponent a winning position. This also covers a position with no legal move, which is losing by the normal-play rule.
The labels of smaller piles must be established before using these rules. Do not declare a position losing merely because the largest removal fails; another legal move might work.
From a small table to a strategy
Example 1. Build the table for removing 1 or 2
Players may remove 1 or 2 counters. Classify piles from 0 through 8, then find a winning first move from 8.
Idea: Look backwards from the empty pile. For each row, inspect every legal smaller position.
| Counters | Label | Reason |
|---|---|---|
| 0 | No move. | |
| 1 | W | Remove 1 to reach 0 (L). |
| 2 | W | Remove 2 to reach 0 (L). |
| 3 | Both 2 and 1 are W. | |
| 4 | W | Remove 1 to reach 3 (L). |
| 5 | W | Remove 2 to reach 3 (L). |
| 6 | Both 5 and 4 are W. | |
| 7 | W | Remove 1 to reach 6 (L). |
| 8 | W | Remove 2 to reach 6 (L). |
From 8, remove 2, leaving 6. If the opponent removes 1, remove 2; if the opponent removes 2, remove 1. Each pair of turns removes 3, so you leave 3 and then 0 after your turns. You take the last counter. Removing 1 initially would leave 7, a winning position for the opponent.
The table suggests that multiples of 3 are losing. It verifies only the displayed piles. The next argument explains why the pattern continues.
The bridge: a pattern needs two directions
For removals 1 or 2, claim that exactly the nonnegative multiples of 3 are L. Start with 0. Now assume every smaller pile has already been classified correctly.
- From a positive multiple of 3, subtracting either 1 or 2 leaves a nonmultiple of 3. By the earlier classifications both resulting positions are W. Therefore the multiple is L.
- From a nonmultiple, the remainder after division by 3 is 1 or 2. Subtract that remainder to leave a smaller multiple of 3, which is L. Therefore the nonmultiple is W.
These two statements let us classify the next pile correctly whenever all smaller ones are known. Starting from 0, they prove the result for every nonnegative pile size. This is a strong-induction argument in plain language. Showing only that a multiple can move to a nonmultiple would leave half the proof missing.
Any removal from 1 through m
Let m be a fixed positive integer. Suppose every removal from 1 through m is allowed and the last counter wins. Then exactly the multiples of m + 1, including 0, are losing. The same two-direction proof works: no permitted removal preserves a remainder of 0, and every nonzero remainder is an allowed amount to subtract.
After leaving a positive multiple of m + 1, answer an opponent’s removal of with (m + 1) − r. Both amounts lie from 1 through m. The reply is legal even near the end: from a pile of at least m + 1, the opponent’s move leaves at least (m + 1) − counters. Each complete pair returns to a smaller multiple; the final reply takes the last counter.
Example 2. Use the remainder, then keep control
There are 38 counters. Each turn removes 1, 2, 3 or 4. Who can force a win, and how?
Idea: The permitted moves are consecutive, so the losing piles are multiples of 4 + 1 = 5.
Divide 38 by 5: 38 = 7 × 5 + 3. The first player removes 3, leaving 35. Thereafter, if the opponent removes counters, remove 5 − . For example, answer 4 with 1, and answer 2 with 3.
After your turns the pile sizes are 35, 30, 25, …, 5, 0. All replies are legal by the preceding argument. You remove the last counter, regardless of the opponent’s choices. Thus the first player can force a win.
Change the move set: rebuild before reusing
The formula “multiples of the largest move plus 1” uses every removal from 1 through the largest. It may fail when some are missing. Suppose the allowed removals are 1, 3 or 4. We cannot use the rule for removals 1 through 4, because removing 2 is no longer legal.
Example 3. A missing move creates two losing remainders
With removals 1, 3 or 4, classify 0 through 9. What pattern should we try to prove?
Start from 0 (L). Pile 1 is W because it can reach 0. Pile 2 is L because its only legal move reaches 1 (W). Pile 3 is W because it can reach 0 or 2; pile 4 is W because it can reach 0; pile 5 is W because removing 3 reaches 2; and pile 6 is W because removing 4 reaches 2.
From 7 the possible successors are 6, 4 and 3, all W, so 7 is L. From 8, removing 1 reaches 7, so 8 is W. From 9 the successors are 8, 6 and 5, all W, so 9 is L.
Thus the labels from 0 through 9 are L, W, L, W, W, W, W, L, W, L. The losing sizes 0, 2, 7, 9 suggest remainders 0 or 2 on division by 7. A short table is evidence for a conjecture; it is not yet a proof for a large pile.
Prove the 0-or-2 remainder rule
For removals 1, 3 or 4, exactly the nonnegative pile sizes with remainder 0 or 2 on division by 7 are L. Here is the complete two-direction argument.
No move stays in the proposed losing set. Starting with remainder 0, subtracting 1, 3 or 4 gives remainders 6, 4 or 3. Starting with remainder 2 gives remainders 1, 6 or 5. None is 0 or 2. If a subtraction is too large for a small pile, simply omit that illegal move.
| Current remainder | Remove | New remainder |
|---|---|---|
| 1 | 1 | 0 |
| 3 | 1 | 2 |
| 4 | 4 | 0 |
| 5 | 3 | 2 |
| 6 | 4 | 2 |
Every other size has a move into that set. The table supplies one. Each chosen removal is legal even for the smallest nonnegative pile with that remainder: for instance, a remainder of 4 means at least 4 counters.
Finally use induction on pile size. The base 0 is L. If all smaller positions follow the claimed rule, a proposed L position has only W successors, and a proposed W position has the listed L successor. The classification rules therefore prove the next case. This establishes the pattern for every nonnegative integer.
Example 4. Find all winning choices, not just one
A pile has 24 counters, and removals are 1, 3 or 4. Find every winning first removal.
Since 24 = 3 × 7 + 3, this is a winning position, but that does not make every move successful. Inspect each legal choice:
- Remove 1: the opponent receives 23, with remainder 2. This is L.
- Remove 3: the opponent receives 21, with remainder 0. This is L.
- Remove 4: the opponent receives 20, with remainder 6. This is W.
Therefore the winning first removals are 1 and 3. After either, use the proved remainder table after every opponent move to return them to a remainder of 0 or 2. Removing 4 allows the opponent to remove 4 and leave 16, which has remainder 2, taking control of the game.
Optional bridge: the last counter now loses
A changed ending changes the mathematics. In the next example only, removing the last counter causes an immediate loss. Start with a positive pile. Do not carry over “0 is losing for the next player”: the game has already ended when someone takes the last counter. Instead begin with 1, where the player must take it and lose.
Example 5. Move the target when the ending changes
Players remove 1, 2 or 3 counters, but whoever takes the last counter loses. Starting from 18, can the first player force a win?
With 1 counter, the player to move loses. With 2, 3 or 4, a player can leave exactly 1 and win. With 5, every allowed move leaves 2, 3 or 4, each winning for the next player, so 5 is losing. This suggests the positive losing sizes 1, 5, 9, 13, …, those with remainder 1 on division by 4.
Here is why the rule holds. From a size greater than 1 with remainder 1, every legal removal of 1, 2 or 3 leads to a positive size with a different remainder. Conversely, use the following explicit choice: remainder 0 → remove 3; remainder 2 → remove 1; remainder 3 → remove 2. The smallest positive piles in these three cases are 4, 2 and 3 respectively, so each chosen move is legal and leaves at least one counter, with remainder 1. Together with the base case 1, the same smaller-position reasoning proves the claim.
Since 18 has remainder 2, remove 1 and leave 17. Answer each opponent removal with 4 − until you leave 1. These replies are legal while the target pile is at least 5. At 1, the opponent is forced to take the last counter and loses. The first player therefore wins.
Notice the shifted target: multiples of 4 under last-counter-wins, but positive sizes one more than a multiple of 4 under last-counter-loses.
Common mistakes and a useful repair
- Calling a pile “good for the first player” forever. Labels refer to whoever is about to move. After your move, the label describes your opponent’s position.
- Taking the most counters each turn. Check all legal successors. A large removal can hand the opponent a winning position.
- Using a normal-play formula after changing the ending. Write the terminal rule before calculating. With last-counter-loses, start with the one-counter case.
- Copying a period from a few rows. Prove both directions: no move within the losing set, and a move into that set from every other position.
- Claiming a strategy after just a first move. Explain how to answer every opponent reply and why those replies remain legal near the end.
- Allowing an oversized removal. Remove it from the list before classifying the position.
Nine original written problems
Unless a problem says otherwise, the rules are normal play: alternate legal removals from one pile, no passing or over-removal, and the player with no legal move loses. Each game below includes removal 1, so the last counter wins. A “winning removal” is one from which the player can force a win against every reply. Attempt each question before opening its hints.
Level 1 — Establish the basic strategy
Problem 1. A first move needs a continuation
There are 17 counters, and each move removes 1 or 2. Find the winning first removal and describe a strategy for the rest of the game.
Hint 1
Which pile sizes are losing for removals 1 or 2?
Hint 2
The remainder of 17 on division by 3 is 2. After reaching a multiple of 3, make each pair of removals total 3.
Full solution
The losing sizes are multiples of 3. Since 17 = 5 × 3 + 2, remove 2, leaving 15. After the opponent removes , remove 3 − , which is either 1 or 2. The piles after your turns are 15, 12, 9, 6, 3 and 0, so you take the last counter.
The other first removal, 1, would leave 16, a winning size for the opponent. Thus 2 is the only winning first removal. The response rule, not merely the first move, gives the guarantee.
Problem 2. The second player can control the game
There are 28 counters. Each turn removes 1, 2 or 3. Decide which player can force a win and justify your answer.
Hint 1
The target spacing is one more than the largest allowed removal.
Hint 2
If the first player removes r, can the second player make the pair total 4?
Full solution
The allowed removals are 1 through 3, so losing sizes are multiples of 4. Since 28 = 7 × 4, the second player can force a win. After any first-player removal , the second removes 4 − . The second player consequently leaves 24, 20, 16, 12, 8, 4 and 0.
The reply always belongs to {1, 2, 3}. From a positive multiple of 4, there are enough counters for a whole pair of moves. The final reply takes the last counter. This handles every possible first-player sequence, not just a cooperative example.
Problem 3. Test the tempting greedy move
A player sees 6 counters and may remove 1, 2 or 3. They claim: “Taking 3 is best because it leaves the smallest pile.” Explain why this fails, and find the winning first removal.
Hint 1
Check whether taking 3 lets the opponent finish immediately.
Hint 2
The losing positive piles for this game are 4, 8, 12, ….
Full solution
If the player removes 3, exactly 3 remain. The opponent may remove all 3 and win immediately. So the smallest remaining pile is not necessarily best.
Instead remove 2 and leave 4, a losing position. If the opponent then removes 1, 2 or 3, reply with 3, 2 or 1 respectively and take the last counter. Removing 1 would leave 5, where the opponent can remove 1 to leave 4. Thus removing 2 is the only winning first choice.
Level 2 — Transfer to missing moves and inverse questions
Problem 4. Every winning move
With 31 counters and removals 1, 3 or 4, find all winning first removals.
Hint 1
Use the losing remainders 0 and 2 on division by 7.
Hint 2
Inspect 31 − 1, 31 − 3 and 31 − 4 separately.
Full solution
The three possible successors are 30, 28 and 27. Their remainders on division by 7 are 2, 0 and 6 respectively. Thus 30 and 28 are losing for the opponent, while 27 is winning.
The winning first removals are therefore 1 and 3. Removing 4 is not winning: from 27 the opponent can remove 4 to leave 23, whose remainder is 2. After either successful first choice, return the opponent to remainder 0 or 2 after each of their moves, using the proved table. Checking all three legal moves proves the list is complete.
Problem 5. Count the difficult starting piles
A positive starting size is chosen from 1 through 60. For how many sizes can the second player force a win when removals are 1, 3 or 4?
Hint 1
The second player wins exactly when the first receives a losing position.
Hint 2
Count the positive multiples of 7 and the numbers 2, 9, 16, … separately.
Full solution
For this game the losing sizes have remainder 0 or 2 on division by 7. In the interval 1 through 60, the positive multiples of 7 are 7, 14, …, 56: 8 sizes.
The sizes with remainder 2 are 2, 9, 16, 23, 30, 37, 44, 51 and 58: 9 sizes. These two lists cannot overlap because their remainders differ. Therefore the second player can force a win for 8 + 9 = 17 starting sizes. Zero is excluded by the stated interval.
Problem 6. Recover the allowed range
Let m be a positive integer. A game starts with 40 counters, and every removal from 1 through m is allowed, subject to the pile being large enough. Find all m for which the second player can force a win.
Hint 1
For consecutive removals, ask whether the starting size is divisible by m + 1.
Hint 2
List every positive divisor of 40, then discard the one that would give m = 0.
Full solution
The second player can force a win exactly when the initial pile is losing. For removals 1 through m, this means m + 1 divides 40.
The positive divisors of 40 are 1, 2, 4, 5, 8, 10, 20 and 40. Because m is positive, m + 1 is at least 2, so discard divisor 1. Subtracting 1 from every remaining divisor gives m = 1, 3, 4, 7, 9, 19 or 39.
Each listed value works by the consecutive-move theorem. Conversely, any winning strategy for the second player requires a losing start, so it must give one of the divisors already listed. If m is at least 40, the first player can take all 40 immediately, agreeing with its exclusion.
Level 3 — Write a complete proof
Problem 7. Replace a table with parity
The only allowed removals are 1, 3 or 5, and the last counter wins. Prove that exactly the even nonnegative pile sizes are losing.
Hint 1
Every allowed removal changes parity. What happens from an odd pile?
Hint 2
Prove both directions, starting with 0; from any positive odd pile, removing 1 reaches an even pile.
Full solution
We classify positions from smallest to largest. The base size 0 is even and losing because no move is available.
Assume all smaller pile sizes have the claimed classification. From an even positive pile, every legal removal is odd, so every successor is odd and therefore winning by the assumption. Hence the even pile is losing. This argument uses only legal removals; for a pile of 2, for example, removals 3 and 5 are unavailable.
From an odd positive pile, removing 1 is always legal and leaves a smaller even pile, which is losing by the assumption. Thus the odd pile is winning. The two cases prove the statement for every nonnegative pile size by induction.
Problem 8. Prove the changed-ending rule
Let m be a positive integer. Players remove from 1 through m counters, but the player who takes the last counter loses. Starting piles are positive. Prove that exactly the sizes one more than a multiple of m + 1 are losing. Then find the winning first removal from 30 when m = 3.
Hint 1
Begin with the one-counter pile. The empty pile is not a new turn in this version: taking the last counter ends the game.
Hint 2
A positive size not equal to 1 modulo m + 1 can leave a positive size that is. Handle a move taking the whole pile as an immediate loss.
Full solution
For a pile of 1, the player must take the last counter and loses, so the base case agrees with the claim. Now classify larger positive sizes using already established smaller ones.
If a pile has the form (m + 1) + 1 with ≥ 1, it is at least m + 2. Every legal removal is between 1 and m, so the resulting pile is positive and no longer one more than a multiple of m + 1. Each such smaller pile is winning by induction. Therefore the original pile is losing.
For any other positive size, divide the number one less than the pile size by m + 1. Its remainder lies from 1 through m. Remove ; the remaining pile is positive and one more than a multiple of m + 1. It is losing by induction, so this is a winning move. The alternative of taking the whole pile, when available, causes an immediate loss and does not invalidate the existence of this winning move.
This proves both directions. With m = 3, losing sizes are 1, 5, 9, …, 29, …. From 30 remove 1, leaving 29. Answer each later removal with 4 − while at least 5 remain, until the opponent receives 1 and must lose.
Problem 9. When does an extra move destroy a strategy?
Fix an integer k ≥ 3. Add removal k to the allowed removals 1 and 2, with the usual last-counter-wins rule. Determine exactly which values of k leave the losing positions unchanged: all nonnegative multiples of 3.
Hint 1
If k is a multiple of 3, inspect a starting pile of exactly k counters.
Hint 2
If k is not a multiple of 3, check whether any allowed removal can connect two multiples of 3. The original moves 1 and 2 are still available.
Full solution
If k is divisible by 3: The pile of counters was formerly losing, but the new move removes all and wins immediately. Thus the losing positions are not unchanged.
If k is not divisible by 3: None of the allowed removals 1, 2 or is divisible by 3. Hence from a multiple of 3 every legal move reaches a nonmultiple. From a nonmultiple, the original move of 1 or 2 equal to its remainder still reaches a smaller multiple of 3.
Starting with 0, induction using these two facts shows that multiples of 3 remain losing and every other size remains winning. Extra moves that are too large are simply not legal and do not affect the argument. Consequently the losing set is unchanged exactly when k is not divisible by 3. Both the failure direction and the preservation direction are necessary for “exactly”.
Start a short practice round
Study Examples 1–4 before starting. The hardest checks also use the explicitly changed ending in Example 5 and the proof extensions. This adaptive round chooses six responses from nine multiple-choice checks and provides hints, feedback and a return link to the relevant explanation. A requested solution counts as a response: completing six responses means finishing the round, not six independent correct answers or mastery.
The written proofs above are separate. The engine checks selected answers; it does not automatically assess an arbitrary proof. Practice is free and needs no account. Optional progress is remembered only if you choose to save it on this device.
Interactive practice loads here. You can also use the complete question set below.
Check a strategy proof
This five-point self-review rubric is not an official contest marking scheme. Give one point for each part actually present in your argument.
- Rules and viewpoint: I state the allowed moves, legal-size restriction and ending rule, and label positions for the player about to move.
- Base case: I explain the terminal position; for last-counter-loses I begin with a positive one-counter pile.
- Losing direction: I check every legal successor of each proposed losing position.
- Winning direction: I give a legal move into the losing set from every remaining position and justify why the classification applies beyond a finite table.
- Strategy and conclusion: I explain responses to every opponent choice, legality near the end and who takes, or is forced to take, the last counter. For “all” questions I exclude every omitted case.
My proof notebook
Use paper or the optional browser notebook. Saving is your choice and does not submit your proof for grading.
Choose your next step
- If W and L were reversed, revisit the zero-counter explanation, then rebuild the first four rows of Example 1.
- If a first move worked but later play was unclear, practise the complementary response with a partner making different choices.
- If a missing removal caused trouble, use the 1, 3 or 4 game and check every legal successor.
- If a proof was incomplete, compare the two directions in the remainder proof. A short pattern table is only a starting point.
- After a round, return to your paper and retry the question that brought you here without its solution. Use the return link when you arrived from a supported paper page, or keep the paper open in your browser.
- Continue via the Bangladesh study route, the published mock catalogue, or your optional local revision list.
Contest context and originality
The official Bangladesh Mathematical Olympiad provides the contest route and released-paper context. The official past-paper archive links to the 2026 regional and national compilation; PDF page 3 (printed page 2), Khulna/Sirajganj Primary Question 5, supplies broad game-strategy context. This does not establish the exact Online Selection paper format. Source context checked 25 October 2026. The explanations, tables, worked examples, written questions and adaptive items are original AI-assisted teaching material about standard mathematics. No official problem is reproduced or translated. No affiliation, endorsement, exam prediction or human-review claim is made.
Prepared for IMOolympiad.com. Report a specific unclear step or correction. Optional progress stays in this browser.