AIME Number Theory: Choose Euler or CRT With a Divisibility Ladder

For AIME Number Theory problems that mix an exponent condition with residue constraints, use a divisibility ladder: check gcd(base, modulus), reduce the exponent period only when Euler is legal, then combine all congruences with CRT. If gcd > 1 and the target is 1, stop because the exponent condition is impossible for positive n.

Use a ladder, not a tool-first reflex

The useful decision is not simply Euler versus CRT in the abstract. The useful decision is which condition restricts n first. A four-rung ladder keeps the legal checks visible before algebra begins.

Rung Question Action Failure if skipped
1 Is gcd(base, modulus) = 1? Check before naming Euler. Using a theorem outside its hypothesis.
2 What is the order or period? Turn a^n into a condition on n modulo the order. Checking the wrong exponent class.
3 What congruences remain? Combine them with CRT when moduli are pairwise coprime. Stopping after one residue condition.
4 Does the answer satisfy the original? Substitute into every congruence, including the exponent. Recording a solution to a transformed but not original system.

The ladder prevents two different errors. One is applying Euler when the base and modulus share a factor. The other is starting CRT with two residue conditions, finding a tidy residue class, and forgetting that the exponent condition has quietly imposed a third congruence on n.

Three signals decide the first move

Before solving, scan for three signals. First, an exponential congruence such as a^n ≡ b mod m: this is usually exponent-first because powers are periodic modulo m once gcd(a,m)=1. Second, two or more residue constraints on n: these are CRT material, but only after the exponent condition has been translated. Third, a base that may not be coprime to the modulus: this is a stop-and-check signal, not a cue to force Euler.

Signal What it changes
a^n ≡ b mod m Find the period of a modulo m; replace n by a residue class modulo that period.
Two or more n-congruences Use CRT after all moduli and residues are on the table.
gcd(a,m) > 1 Do not cite Euler. If b = 1, the condition is impossible for positive n.

A student who starts CRT first is not automatically wrong. CRT is a combining tool. The danger is treating a two-remainder result as complete when the exponent condition has not yet become a congruence on n. Write a short note such as pending exponent condition in the margin; that small note prevents a long but incomplete solution.

Divisibility ladder

A fully worked teaching illustration

Teaching illustration, not a past AIME problem. Find the smallest positive integer n satisfying n ≡ 2 mod 5, n ≡ 3 mod 7, and 2^n ≡ 1 mod 9.

Step 1: check the gcd and find the period

Here gcd(2,9)=1, so period reduction is legal. Compute powers of 2 modulo 9: 2^1 ≡ 2, 2^2 ≡ 4, 2^3 ≡ 8, and 2^6 = 64 ≡ 1. The divisors of 6 are 1, 2, 3, and 6; none of 1, 2, or 3 gives 1 modulo 9. Thus the order is exactly 6. Therefore 2^n ≡ 1 mod 9 exactly when n ≡ 0 mod 6.

Step 2: combine the two residue conditions

Solve n ≡ 2 mod 5 and n ≡ 3 mod 7. The least positive solution is 17, since 17 ≡ 2 mod 5 and 17 ≡ 3 mod 7. The general solution is n = 17 + 35k.

Step 3: impose the exponent condition

Require 17 + 35k ≡ 0 mod 6. Reducing modulo 6 gives 5 + 5k ≡ 0, so 5(1+k) ≡ 0 mod 6. Because gcd(5,6)=1, this is equivalent to 1+k ≡ 0 mod 6, or k ≡ 5 mod 6. The smallest nonnegative k is 5, giving n = 17 + 35(5) = 192. The general solution is n = 192 + 210t.

Step 4: verify in every original condition

Check 192 mod 5 = 2; 192 mod 7 = 3; and 192 mod 6 = 0, so 2^192 ≡ (2^6)^32 ≡ 1 mod 9. If CRT had been stopped at n ≡ 17 mod 35, the candidate n = 17 would fail the exponent test: 2^17 ≡ 2^5 = 32 ≡ 5 mod 9, not 1. That failure is exactly the diagnostic this ladder is designed to catch.

A second period check: the order is not always phi(m)

Teaching illustration. Consider 3^n ≡ 1 mod 8. Here gcd(3,8)=1, so Euler applies, and phi(8)=4. But phi(8) is not the exact order. Compute powers: 3^1 ≡ 3, 3^2 = 9 ≡ 1 mod 8. The order is 2, not 4. Thus 3^n ≡ 1 mod 8 exactly when n ≡ 0 mod 2. A solver who assumes the exponent period must be phi(m) would over-restrict n and could reject valid candidates.

This mini-case reinforces the second rung. Euler's theorem gives a legal period, but the exact order may be a proper divisor of phi(m). In a written solution, show the short cycle or prove the order by checking the divisors. In an AIME-style setting, the extra check is often faster than repairing an invalid restriction later.

When the exponent target is not 1

Teaching illustration. Solve 2^n ≡ 4 mod 9. The gcd is 1, and the order of 2 modulo 9 is still 6. The cycle of 2^n modulo 9 for n = 1,2,3,4,5,6 is 2, 4, 8, 7, 5, 1. The value 4 appears when n ≡ 2 mod 6. So the exponent condition becomes n ≡ 2 mod 6.

This case shows why the ladder should not be memorized as n must be divisible by the order. That shortcut works only when the target is 1. For a general target b, reduce the power cycle, locate b in the cycle, and record the matching residue class or classes. If b does not appear in the cycle, the congruence has no solution. The same discipline applies before CRT is used.

Why Euler cannot rescue a non-coprime base

Euler's theorem says that if gcd(a,m)=1, then a^phi(m) ≡ 1 mod m. The hypothesis is not decoration. Suppose d > 1 divides both a and m. If a^n ≡ 1 mod m for positive n, then m divides a^n - 1. Since d divides m, d divides a^n - 1. But d also divides a^n. Hence d divides 1, a contradiction. So 2^n ≡ 1 mod 4 has no positive solution; the powers are 2, 0, 0, ... modulo 4, never 1.

If the right side is not 1, Euler is still not available when the gcd is greater than 1. The safe move is to factor, examine valuations, or compute the eventual cycle. For example, powers of 2 modulo 8 are 2, 4, 0, 0, ...; this is a short cycle analysis, not an Euler reduction. The common rule is to identify the structure before expanding.

When CRT first is legitimate

CRT is the right first tool when the problem gives residue conditions and no unresolved exponent condition. If n ≡ 2 mod 5 and n ≡ 3 mod 7 alone, then n ≡ 17 mod 35 is the complete answer class. CRT is also legitimate after the exponent condition has been converted to a congruence such as n ≡ 0 mod 6. At that point the solver has three congruences with pairwise coprime moduli 5, 7, and 6, and CRT can combine them.

The invalid habit is not CRT first in every context. It is CRT and stop while an exponent condition remains untranslated. If you already know the order, you may combine in any order you can track. The adjacent guide AIME Modular Arithmetic: Recover an Integer From Two Remainders covers the recovery mechanics for two remainders; this article covers the prior decision about whether an exponent condition must be reduced before that recovery is complete.

A modular condition can also arrive through a polynomial remainder rather than a direct power. In that setting, the same principle applies: identify the structure before expanding. The page AIME Polynomial Remainders: Solving Without Expanding Every Term is a useful companion for that structure-first habit, although its focus is polynomial remainders rather than exponent periods.

What the AIME teaching analysis adds

The Hanlin teaching-team analysis published on 4 November 2026 in the Hanlin Courses WeChat article titled 2027 AIME Qualification Switches to Fixed Cutoffs! Prep Planning + High-Energy Trial Class discussed Euler's theorem and CRT in connection with AIME Q11+ number-theory work. It said students need the statement, proof logic, and application context, not only the formula names. That is a coaching judgment, not an MAA rule, but it explains why a decision ladder is more useful than memorizing two theorem names.

A separate Hanlin Courses WeChat note titled Important Notice: Domestic AIME Math Exam Arrangements Confirmed recommends classified past-paper practice in number theory for students targeting an AIME score of 8-10. That is a preparation recommendation, not a promise of a particular score or a prediction about any individual paper.

For season context, MAA's current 2027 competition page lists AIME as 15 integer-answer questions, answers 0-999, in two 90-minute sections of 8 and 7 questions. The section format does not change the number-theory decision ladder, but it does affect pacing and checking habits.

A practice protocol that catches the error before scoring

During practice, classify each mixed number-theory problem before solving it: exponent-first, CRT-first, or gcd stop. Write one line for the gcd check. Write the order or period and the resulting congruence on n. Only then solve the CRT system. Finish by substituting the final candidate into every original condition. This protocol is slower for the first few problems and faster once the classification becomes automatic.

  • If gcd(base, modulus) > 1 and the target is 1, stop and explain why no positive solution exists.
  • If the exponent condition is legal, prove the period or cite a complete cycle; do not assume phi(m) is always the exact order.
  • If CRT is used, state the pairwise coprime moduli and the final modulus product.
  • If the answer is an integer, test the original congruence and the exponent condition separately.

When the final recordable answer must also satisfy an integer bound or inequality, use the range-check discipline described on AIME Floor Function Bounds: Solving Inequalities with Integer Constraints. The topic is different, but the checking principle is compatible: do not record an integer until the original constraints, not just the transformed equations, have been checked.

A common failure is not arithmetic. It is a first reduction that was never legal or never complete. A wrong exponent class often survives arithmetic checks because every individual congruence was solved correctly after an invalid first step. The ladder is a defense against that specific failure mode.

Preparing a useful course-fit or resource question

Before any course-fit conversation, bring one mixed number-theory attempt and mark where the method changed. The useful questions are specific: Did I check gcd before using Euler? Did I prove the order or only assume phi(m)? Did I turn the exponent condition into a congruence on n before combining? Did I verify the final candidate in the original modulus? Did I confuse a two-remainder result with the complete solution?

These questions also help when requesting practice materials. Ask for classified number-theory sets that separate exponent-period reduction from CRT combination, and ask for solutions that state the gcd hypothesis explicitly. A resource that gives only final answers will not reveal whether the failure was the gcd check, the period reduction, or the CRT combination. The ladder is the diagnostic frame; the practice set should make each rung visible.

The takeaway is compact: in mixed AIME number theory, gcd decides legality, order converts the exponent into a congruence, CRT combines complete information, and substitution catches the rest.

Worked path to 192

Frequently Asked Questions

Should I always use Euler's theorem first when an exponent appears?

No. Euler's theorem requires gcd(base, modulus)=1. If gcd > 1 and the target is 1, there is no positive solution, because a common divisor of the base and modulus would divide both a^n and m but could not divide 1. If the target is not 1, Euler is still unavailable; factor or examine the power cycle.

Can I use CRT before reducing the exponent condition?

You can keep the exponent condition alongside and solve later, but the common error is stopping at a two-remainder class such as n ≡ 17 mod 35 and forgetting that 2^n ≡ 1 mod 9 also forces n ≡ 0 mod 6. The safer order reduces the exponent condition first, then combines all congruences with CRT.

What fast check catches a wrong exponent class?

Substitute the final n into every original condition. For the worked example, n = 192 gives 192 mod 6 = 0, so 2^192 ≡ 1 mod 9; n = 17 gives 2^17 ≡ 5 mod 9, so it fails. The check must include the exponent, not only the two remainder conditions.

AIME Modular Arithmetic: Recover an Integer From Two Remainders

In AIME number theory, many problems hide a single integer behind two or more remainder clues. You might know that N leaves remainder 2 when divided by 5 and remainder 3 when divided by 7, but under exam time pressure the wrong move is to list numbers until one fits. The right move is to reconstruct N by substitution, then verify against the allowed answer range. This article focuses on the recovery step: how to turn two remainders into one integer efficiently, how to handle non-coprime moduli, and how to avoid off-by-one range errors. AIME answers are recorded as integers from 0 through 999. The mathematical reconstruction method below focuses only on the modular step.

Why AIME Modular Arithmetic Rewards Reconstruction

AIME problems often do not ask for the solution to a congruence system in abstract language. They ask for a number: the smallest positive integer, the number of objects, the missing digit, or the value that fits a range. Because the final answer must be an integer 0-999, you need both a correct congruence family and the specific representative selected by the problem's wording. Reconstruction is faster than brute force because it uses the structure of division.

Suppose N is congruent to a modulo m and N is congruent to b modulo n. The first statement says N = mk + a for some integer k. That single substitution turns the second congruence into a one-variable linear congruence. If m and n are coprime, there is one solution modulo mn. If they are not coprime, consistency requires a congruent to b modulo gcd(m,n). Many AIME-style traps are built around this consistency condition.

The Core Equation: From Two Remainders to One Variable

Start with the congruence with the larger modulus if you want fewer steps. Let N = mk + a. Substitute into the second congruence:

mk + a is congruent to b modulo n.

Rearrange:

mk is congruent to b - a modulo n.

If gcd(m,n)=1, multiply by the inverse of m modulo n. If gcd(m,n)=d is greater than 1, first check that d divides b-a. If it does not, no solution exists. If it does, divide the entire congruence by d to reduce to a coprime case. Then solve for k modulo n/d. Finally compute N = mk + a. Note that this gives you a base solution N0. The general solution is N = N0 + t * lcm(m,n).

This is the entire engine. The Chinese Remainder Theorem guarantees existence and uniqueness under coprime moduli, but you rarely need to quote the theorem in an AIME solution. You need the substitution.

Systematic Reconstruction Flow

Step-by-Step Method Using the Least Common Multiple

Use this checklist:

  1. Identify m, n, a, and b. Check gcd(m,n). If gcd is greater than 1, test whether b-a is divisible by gcd(m,n).
  2. Write N = mk + a, choosing the modulus that makes the arithmetic simplest, often the larger one.
  3. Solve the resulting linear congruence for k, choose the smallest nonnegative k, then compute N0.
  4. Determine the period L = lcm(m,n). The solutions are N0, N0+L, N0-L, etc.

The lcm tells you how often solutions repeat. If m=5 and n=7, every solution repeats by 35. If the problem asks for the smallest positive N, choose the smallest nonnegative k that gives N greater than 0. If the problem asks for a number between 1 and 999, you must find the specific member of the family N0 + tL that satisfies the additional constraints given in the text.

Teaching Illustration: Two Coprime Remainders

Teaching illustration, not an actual contest problem. Find the smallest positive integer N such that N is congruent to 2 modulo 5 and N is congruent to 3 modulo 7. Here m=5 and n=7 are coprime, and lcm=35.

Use the larger modulus 7. Let N = 7k + 3. Substitute into the first congruence:

7k + 3 is congruent to 2 modulo 5.

Since 7 is congruent to 2 modulo 5, this becomes 2k + 3 is congruent to 2 modulo 5. Subtract 3: 2k is congruent to -1, which is congruent to 4 modulo 5. Multiply by the inverse of 2 modulo 5, which is 3: k is congruent to 12, which is congruent to 2 modulo 5. The smallest nonnegative k is 2. Then N = 7(2)+3 = 17.

Check: 17 divided by 5 leaves remainder 2; 17 divided by 7 leaves remainder 3. The answer 17 is in the 0-999 range. The full solution set is 17 + 35t for integers t.

Notice what did not happen. We did not list numbers ending in 2 until one also had remainder 3 mod 7. We solved one linear congruence for k. That is the efficiency gain.

Teaching Illustration: Non-Coprime Remainders

Teaching illustration, not an actual contest problem. Find the smallest positive integer N such that N is congruent to 1 modulo 4 and N is congruent to 5 modulo 6. Here gcd(4,6)=2. The difference b-a = 5-1 = 4 is divisible by 2, so a solution exists.

Let N = 4k + 1. Substitute into the second congruence: 4k + 1 is congruent to 5 modulo 6, so 4k is congruent to 4 modulo 6. Divide the congruence by 2: 2k is congruent to 2 modulo 3. Since 2 is invertible modulo 3, k is congruent to 1 modulo 3. The smallest nonnegative k is 1, so N = 4(1)+1 = 5. Check: 5 mod 4 = 1 and 5 mod 6 = 5. The solution repeats modulo lcm(4,6)=12, so the solutions are 5 + 12t.

This example shows why the gcd check is not optional. If the original remainders had been N is congruent to 1 modulo 4 and N is congruent to 2 modulo 6, then b-a = 1, not divisible by gcd(4,6)=2, so no integer could satisfy both congruences. Recognizing that in one line saves minutes.

Verification Trick for AIME Answers

After computing N, plug it back into both original remainder statements. This catches arithmetic errors in the substitution. Then perform a second, independent check: confirm the answer is an integer from 0 through 999 and that it satisfies the problem's selection condition.

Do not stop at "it satisfies the congruences." AIME answers are not expressions like 17 + 35t. They are single integers. However, simply being in the 0-999 range is not enough to identify the correct answer if multiple members of the family fall within that range. You must re-read the problem for specific selection criteria, such as "smallest," "largest," or "divisible by X."

Common Pitfalls in AIME Modular Arithmetic

1. Forgetting the gcd consistency condition. If gcd(m,n) is greater than 1, the remainders must agree modulo that gcd. If they do not, no solution exists. If they do, reduce the problem carefully.

2. Dividing a congruence without checking divisibility. You can divide a congruence ax is congruent to b modulo n by d only when d divides a, b, and n. The safer route is to use the gcd condition and reduce the modulus correctly.

3. Using the product instead of the lcm. The solution repeats modulo lcm(m,n), not always mn. For coprime moduli they are equal; for non-coprime moduli they are not.

4. Confusing the answer range with a selection rule. AIME integer answers have a fixed range, but that range does not by itself select a unique member of a congruence family. Re-read the problem for constraints such as "smallest," "largest," or "divisible by X."

5. Reversing the substitution. If you write N = nk + b instead of N = mk + a, you must substitute into the other congruence. Mixing labels is the most common source of sign errors.

Choosing the Larger Modulus: A Small Heuristic

When you write N = mk + a, the modulus m multiplies k. If m is large, the final multiplication may be slightly larger, but the number of possible k values before reaching the target range is smaller. More importantly, choosing the larger modulus often makes the resulting congruence simpler because the variable k is being solved modulo the smaller modulus. For example, with moduli 5 and 7, use N = 7k + 3 and solve modulo 5. This keeps the linear congruence modulo 5. If you choose N = 5k + 2, you solve modulo 7, which is also fine, but arithmetic with 7 can be slightly less immediate. There is no universal rule; choose the representation that makes the inverse easy.

Range Selection: The Critical Step for Uniqueness

AIME answers are integers 0-999. This means after finding the full solution family N = N0 + L t, where L = lcm(m,n), you need the representative requested by the problem. It is crucial to understand that the answer format (0-999) does not automatically make the solution unique. Many families have multiple members in this range.

For the teaching illustration N is congruent to 2 modulo 5 and N is congruent to 3 modulo 7, N0 = 17 and L = 35. The solutions are 17, 52, 87, 122, 157, ... up to 997. All are valid integers in the 0-999 range.

  • If the problem asked for the smallest positive integer, the answer is 17.
  • If the problem asked for the largest solution below 100, the answer would be 87.
  • If the problem asked for the smallest solution above 100, the answer would be 122.
  • If the problem asked for a three-digit solution divisible by 11, you would impose that extra condition: 17+35t ≡ 0 (mod 11). Since 17 ≡ 6 and 35 ≡ 2 modulo 11, this gives 6+2t ≡ 0, so 2t ≡ 5 and t ≡ 8 modulo 11. Thus N=17+35(8)=297, which is divisible by 11.

The modular reconstruction gives the family; the wording selects the member. If the problem asks for a specific property, find the t that satisfies it rather than assuming the 0-999 range is enough.

Practice Strategy: Build Speed with Small Numbers

Before practicing full AIME problems, drill two-remainder reconstructions with small moduli. Use pairs such as mod 3 and mod 4, mod 5 and mod 7, and mod 4 and mod 6. For each pair, write the substitution, solve for k, compute N, and verify. Then identify the smallest positive member of the family N0 + tL. Doing ten of these mentally builds the pattern recognition that AIME speed requires.

When small examples feel automatic, increase the size of the remainders or moduli. The method does not change. The only additional work is arithmetic. This is also a good transition from AMC speed tactics to AIME sustained reasoning, as discussed in AIME Preparation After AMC: When to Switch From Speed to Sustained Reasoning. The goal is not to memorize cases but to trust a repeatable algorithm.

How Modular Reconstruction Connects to Other AIME Topics

Modular reconstruction often appears alongside polynomial remainders. A polynomial remainder problem may ask for a coefficient or constant that satisfies a congruence condition, and the same substitution logic applies. The linked article AIME Polynomial Remainders: Solving Without Expanding Every Term covers the polynomial side; use this article for the integer-recovery side. You can also combine modular thinking with counting problems, where the final count must be reported modulo a small number or placed in a specific residue class.

Answer checking is another natural companion. After finding N, verify that it satisfies both original statements and that it is the correct representative in the AIME range. A focused checklist for that final step appears in AIME Answer Checking: Catching Extraneous Roots Before Recording an Integer. Modular arithmetic rarely rewards rushing; it rewards a short, verifiable chain of arithmetic.

How to Avoid Arithmetic Errors Under Time Pressure

Write the substitution line clearly. Many errors come from skipping the intermediate congruence. If you go straight to a final N, you cannot debug. A three-line habit works well: first, N = mk + a; second, mk + a is congruent to b modulo n; third, mk is congruent to b - a modulo n. Then solve. Keep the original remainders visible. After computing N, check both remainders with division, not with mental modulo shortcuts. Finally, check the range and the specific selection criterion (smallest, largest, etc.).

If the problem gives more than two remainders, pair them one at a time. Solve the first two to get a combined congruence N is congruent to N0 modulo L. Then combine that with the third remainder. The method is identical, and the modulus becomes the lcm of the first two moduli. This is how AIME problems sometimes disguise a multi-step CRT problem as a word problem.

Verification Checklist

Frequently Asked Questions

Do I need to memorize the Chinese Remainder Theorem formula?

No. For AIME modular arithmetic, the constructive substitution method is usually faster and less prone to memory errors than recalling a general formula.

What if the moduli are not coprime?

First check whether the remainders agree modulo the gcd of the moduli. If they do not, no solution exists. If they do, reduce the congruence correctly and solve the remaining linear congruence.

Does the 0-999 answer range make the solution unique?

No. The range only limits which representatives can be recorded. You still need the problem's own selection condition, such as "smallest positive" or "divisible by 11," to choose the unique member of the congruence family. Then verify that the chosen integer satisfies both original remainder conditions.

Online Consultation
Online Consultation