Method line M13 · When and why do we use it?

Prime Factor Analysis

In the Chinese book: 素因数分析

Write integers as products of primes and compare only the exponents.

📖 §3.2 of 《解题方法与策略》

One idea, one pictureDrag n. When is every bar an even height? What kind of number is n then?

Loading figure…

In one sentence

Every integer greater than can be written as a product of primes, and in only one way:

So everything about an integer is contained in a row of exponents. Prime factor analysis means: stop staring at the number itself and look at that row of exponents.

  • divides : none of 's bars is taller than the matching bar of .
  • A perfect square: every exponent is even.
  • The greatest common divisor takes the lower bar; the least common multiple takes the higher one.
  • A prime: just one bar, of height , so the only way to split it is itself.

Predict first

. How many positive divisors does it have? (Hint: in a divisor, the exponent of can be or .)

Choose an answer first; then you can see the result.

Stop 1 · Primes and composites (Vol. 6)

A prime has the simplest bar chart of all, so “some expression is prime” is a strong condition: as soon as the expression factors, one of the factors is forced to be .

Example: find all positive integers n for which n² − 8n + 15 is prime

Step 1 / 5
  1. Factor first

    Cross method: and .

Stop 2 · The Fundamental Theorem of Arithmetic (Vol. 6)

Put two numbers side by side and compare bars: for each prime, the lower bar goes to the gcd, the higher bar to the lcm.

Example: gcd(a, b) = 12, lcm(a, b) = 360, a ≤ b. How many pairs (a, b) are there?

Step 1 / 5
Loading figure…
  1. Factor the two given numbers

    and . Look at the simplest pair first: , .

Stop 3 · Perfect squares (Vol. 6)

In a perfect square, every bar has an even height. Not a square? See which bars have an “odd one out” and top them up.

Example: what is the smallest positive integer k that makes 360k a perfect square?

Step 1 / 4
Loading figure…
  1. Look at the parity of the exponents

    . The exponents are : the exponents of and are odd, so each has one block left over.

The other way round: if a product is a square, must each factor be a square? Drag and below and find the pattern.

Loading figure…
, but neither nor is a square. Now try , . Which reading shows the difference between the two cases?

When and are coprime, no prime is shared by both, so their exponents cannot “team up to make an even number”. Only then does “ is a square” mean that and are each squares. For example, consecutive positive integers and are coprime, so if were a square, and would both be squares. But two positive squares differ by at least . So is never a perfect square.

Stop 4 · Integer roots of quadratic equations (Vol. 2)

Integer-root problems can often be turned into “a product of two integers equals a specific number”. The fewer prime factors that number has, the fewer the possibilities.

Find all integers for which both roots of are integers.

Example: both roots of x² − kx + k + 6 = 0 are integers

Step 1 / 5
Loading figure…
  1. Vieta's formulas

    Call the two integer roots and . Their sum is and their product is .

Practice

Exercise 1Basic

How many positive divisors does have?

Exercise 2Advanced

What is the smallest positive integer that makes a perfect square?

Exercise 3Challenge

Find all integers for which both roots of are integers. (There are two answers; separate them with a comma.)

Mistake Museum · Exhibits from this stop

Before you leave, look at the traps other people fell into here.See every exhibit in the museum →

Exhibit

The product is a square, so each factor is a square

The wrong step: is a perfect square, so and are both perfect squares.
What went wrong? Think first, then open

Diagnosis , yet neither nor is a square. They share the prime factor : has one , has three, and together that makes four, an even number.

The right step: You need first. When they are coprime, each prime belongs to only one of the numbers, so the exponents cannot combine. Only then does “ is a square” imply “ and are both squares”.

“Check coprime first, then split the square”

Exhibit

Forgetting negative factors and 1

The wrong step: is prime, so the smaller factor and . That is the only answer.
What went wrong? Think first, then open

Diagnosis A prime written as a product of two integers can be , but also . Here gives , and is prime too.

The right step: When you split into integer factors, list both signs: or , giving or .

“Integer factor pairs come in positive and negative versions”

Stops on this line

The same idea, used once in each of several places.

  1. Primes and CompositesVol. 6 Divisibility, Congruences and Diophantine Equations, §1.2
  2. The Fundamental Theorem of ArithmeticVol. 6 Divisibility, Congruences and Diophantine Equations, §1.4
  3. Perfect SquaresVol. 6 Divisibility, Congruences and Diophantine Equations, §2.5
  4. Integer Roots of Quadratic EquationsVol. 2 Equations and Systems of Equations, ch. 16