# Simon's Favorite Factoring Trick

## Contents

## The General Statement

Simon's Favorite Factoring Trick (SFFT) is often used in a Diophantine(Positive) equation where factoring is needed. The most common form it appears is when there is a constant on one side of the equation and a product of variables with each of those variables in a linear term on the other side. A extortive example would be: where is the constant term, is the product of the variables, and are the variables in linear terms.

Let's put it in general terms. We have an equation , where , , and are integral constants. According to Simon's Favourite Factoring Trick, this equation can be transformed into:
Using the previous example, is the same as:

If this is confusing or you would like to know the thought process behind SFFT, see this eight-minute video by Richard Rusczyk from AoPS: https://www.youtube.com/watch?v=0nN3H7w2LnI. For the thought process, start from https://youtu.be/0nN3H7w2LnI?t=366

## Applications

This factorization frequently shows up on contest problems, especially those heavy on algebraic manipulation. Usually and are variables and are known constants. Also, it is typically necessary to add the term to both sides to perform the factorization.

## Fun Practice Problems

### Introductory

- Two different prime numbers between and are chosen. When their sum is subtracted from their product, which of the following numbers could be obtained?

(Source)

### Intermediate

- are integers such that . Find .

(Source) NERD

### Olympiad

- The integer is positive. There are exactly 2005 ordered pairs of positive integers satisfying:

Prove that is a perfect square.

Source: (British Mathematical Olympiad Round 3, 2005)