`````````````````````````
Or mainly use the formula a 2-b 2 = (a+b) (a-b).
a^3-b^3=(a-b)(a^2+ab+b^2)
There is no specific formula for the problem you mentioned. Given the size of n, it can be calculated.
For example, if the given n is an even number, once it is decomposed, the denominator (1-q) will be removed, and an equation about q will be obtained, which may be unary, binary or ternary ... Finally, you will generally get the formula of (a+q) (b+q) (c+q) ... = 0 for factorization, and you can get the corresponding formula.
If n is odd, it's almost the same. Using the above two formulas, we can decompose and simplify repeatedly, and finally we can find out q~