Π Prime Factor.app
Theoretical Foundations & Competition Shortcuts

Number Theory Training Arena

An exhaustive, textbook-style pedagogical resource. Progress sequentially from foundational arithmetic axioms to rapid mental divisibility laws and hyper-advanced Math Olympiad speed shortcuts.

SECTION A

Absolute Basics · Foundational Axioms

The building blocks of integer arithmetic. Before deploying speed shortcuts, every competitor must solidify the conceptual core of primes, composites, and canonical factorization trees.

Chalkboard math formulas
Axiom 1.1 p > 1

Prime vs. Composite Numbers

A prime number is an integer strictly greater than 1 whose only positive divisors are 1 and itself. A composite number possesses at least one divisor other than 1 and itself, meaning it can be fractured into smaller integer factors.

First 10 Prime Atoms:
2, 3, 5, 7, 11, 13, 17, 19, 23, 29

Crucial Note: The integer 1 is neither prime nor composite by definition. The number 2 is the only even prime in existence.

Geometric blueprints
Axiom 1.2 n = ∏ pᵢ^aᵢ

Fundamental Theorem of Arithmetic

Also known as the Unique Factorization Theorem: Every integer $n > 1$ can be represented as a product of prime numbers in exactly one way, disregarding the order of the multipliers.

n = p₁ᵃ¹ × p₂ᵃ² × ... × pₖᵃᵏ

Because prime decomposition is immutable and unique, factorization provides the mathematical "DNA" of every number. If two competitors factorize 360, both must inevitably derive $2³ \times 3² \times 5$.

Technical drawing instruments
Axiom 1.3 Branching Tree

Prime Factorization Trees

A factor tree decomposes a composite recursively into two convenient non-trivial factors until every terminal leaf is a prime atom.

Visual Tree Walk: 60
60 → 6 × 10
  • 6 → 2 × 3
  • 10 → 2 × 5
Collate leaves: 2² × 3 × 5

Any initial branch split (e.g. $4 \times 15$ or $2 \times 30$) always converges to the exact same prime product.

SECTION B

Core Divisibility Rules · Case Studies (2 through 10)

Divisibility tests eliminate sluggish trial division. By inspecting terminal digits or modular digit sums, a competitor immediately isolates factors within 200 milliseconds.

Divisibility by 2 Mod 2

Even Terminal Digit

1,476 → Ends in 6 (Even)

Rule: The integer is divisible by 2 if and only if its last digit is even: {0, 2, 4, 6, 8}. Continuously divide by 2 until the remaining quotient becomes odd.

Divisibility by 3 Mod 3

Sum of Digits Multiple of 3

831 → 8 + 3 + 1 = 12

Rule: If the sum of all digits is divisible by 3, the entire number is divisible by 3. Since 12 ÷ 3 = 4, 831 ÷ 3 = 277 (prime).

Divisibility by 4 2² Isolation

Last Two Digits Divisible by 4

3,524 → Last 2 Digits: 24

Rule: Since 100 = 4 × 25, hundreds are always divisible by 4. Only inspect the last two digits. 24 ÷ 4 = 6 → 3,524 contains 2² = 4.

Divisibility by 5 Mod 5

Terminal 0 or 5

2,875 → Ends in 5

Rule: Any integer ending in 0 or 5 contains 5 as a prime divisor. Divide 2,875 by 5 → 575; by 5 → 115; by 5 → 23 (yielding 5³ × 23).

Divisibility by 6 2 × 3 Composite

Joint 2 and 3 Divisibility

918 → Even & 9+1+8 = 18

Rule: 6 = 2 × 3. The number must be both even (divisible by 2) AND have a digit sum divisible by 3. 918 is even and 18 ÷ 3 = 6 → divisible by 6.

Divisibility by 8 2³ Isolation

Last Three Digits Divisible by 8

5,128 → Last 3 Digits: 128

Rule: Since 1,000 = 8 × 125, test the last 3 digits. 128 ÷ 8 = 16. Fast shortcut: If hundreds digit is odd, test if last 2 digits + 4 is divisible by 8 (28+4 = 32).

Divisibility by 9 3² Root

Digital Sum Multiple of 9

4,725 → 4+7+2+5 = 18

Rule: If the digital root is 9 (sum of digits divisible by 9), the number contains 3² = 9. 4,725 ÷ 9 = 525. Digit sum of 525 is 12 (not div by 9, but div by 3 → 525 ÷ 3 = 175 = 5² × 7).

Divisibility by 10 2 × 5 Stripping

Terminal Zero Isolation

4,930 → Ends in 0

Rule: Any integer ending in zero contains 10 = 2 × 5. Instantly slice off the trailing zero, record 2 × 5, and factor the remaining quotient (493 = 17 × 29).

SECTION C

Advanced Cognitive Strategy · Olympiad Peak Speed Mechanisms

Mastery heuristics utilized by Olympiad finalists to decompose integers in sub-second bursts without electronic calculators.

Mathematical formulas background
01

Strategy 01: Parity & Modulo 5 Isolation

Immediate extraction of powers of 2 and 5 by terminal digit inspection

Case Study 1.1

Even Composite Stripping

360 → 2³ × 45

When the last digit is {0, 2, 4, 6, 8}, divide continuously by 2. 360 → 180 → 90 → 45. Stripping 2³ drops the composite from 360 to an odd 45 in three quick mental operations.

Case Study 1.2

Terminal 5 Factor Extraction

875 → 5³ × 7

Any integer ending in 5 contains 5 as a divisor. 875 ÷ 5 = 175; 175 ÷ 5 = 35; 35 ÷ 5 = 7. Three consecutive divisions leave the single prime 7.

Case Study 1.3

Decadic Zero Pairing (10 = 2 × 5)

4,200 → 2² × 5² × 42

Every trailing zero represents a factor of 10 = 2 × 5. Two trailing zeros in 4,200 immediately provide 2² × 5², leaving 42 = 2 × 3 × 7.

Case Study 1.4

Odd Non-5 Quotient Isolation

1,020 → 2² × 5 × 51

Dividing 1,020 by 20 yields 51. Since 51 ends in 1, it has zero factors of 2 and 5. This allows immediate transition to Modulo 3 and digit sum tests.

Abstract geometric blackboard
02

Strategy 02: Sum of Digits & Modulo 9 Heuristics

Digital root heuristics for rapid identification of 3 and 3² = 9 divisors

Case Study 2.1

Modulo 9 Digital Root Test

1,458 → 1+4+5+8 = 18

18 is divisible by 9, proving 1,458 contains 9. 1,458 ÷ 9 = 162. Digital sum of 162 is 1+6+2 = 9, so 162 ÷ 9 = 18. Thus 1,458 = 2 × 3⁶.

Case Study 2.2

Modulo 3 Single Extraction

438 → 4+3+8 = 15

15 mod 9 = 6 ≠ 0, but 15 is divisible by 3. This guarantees exactly one initial factor of 3. 438 ÷ 3 = 146. Parity reveals 146 ÷ 2 = 73 (prime).

Case Study 2.3

Casting Out Nines Shortcut

9,522 → (9) + 5 + 2 + 2 = 9

Cast out digits summing to 9 to accelerate mental checks: ignore 9, then 5+2+2 = 9. 9,522 is divisible by 9 → 9,522 ÷ 9 = 1,058 = 2 × 23².

Case Study 2.4

Fast Elimination of Non-Multiples

1,217 → 1+2+1+7 = 11

11 mod 3 = 2. You instantly eliminate 3 and 9 from all factorization trees without ever attempting trial division. Move directly to primes ≥ 7.

Algebraic chalk equations
03

Strategy 03: Fermat's Difference of Squares (a² - b²)

Decomposition of odd composites via algebraic difference of squares identity

Case Study 3.1

Nearby Square Decomposition

899 = 30² - 1²

899 is one less than 900 = 30². By the identity a² - b² = (a-b)(a+b), 899 = (30 - 1)(30 + 1) = 29 × 31. Solved in 2 seconds without trial division.

Case Study 3.2

Two-Step Square Proximity

2,496 = 50² - 2²

2,496 is four less than 2,500 = 50². Using a² - b², 2,496 = (50 - 2)(50 + 2) = 48 × 52. Further factor 48 = 2⁴ × 3 and 52 = 2² × 13 → 2⁶ × 3 × 13.

Case Study 3.3

Twin Prime Factorization Clue

3,599 = 60² - 1²

3,599 is one less than 3,600 = 60². Therefore 3,599 = (60 - 1)(60 + 1) = 59 × 61. Both 59 and 61 are prime numbers, completing the decomposition.

Case Study 3.4

Fermat Iterative Testing

1,517 + 2² = 39²

Ceiling root of 1,517 is 39 (39² = 1,521). 1,521 - 1,517 = 4 = 2². Thus 1,517 = 39² - 2² = (39 - 2)(39 + 2) = 37 × 41. Solved on the first Fermat step.

Geometric matrix architectural layout
Interactive Drill

Zero-Timer Strategy Sandbox

Select a strategy model, enter any positive integer, and watch the step-by-step mathematical decomposition without timer pressure.

Strategy 03: Difference of Squares (a² - b²)