<s>[INST] Prime number decomposition What is the fastest way to decompose the given number to prime numbers without using calculator?
Example : $$3575$$
What I do is :
$$3575 = 3 \times 10^3 + 5 \times 10^2 + 7 \times 10 + 5 = 3\times5^3\times2^3 + 5^2 \times 2^2 \times 5 + 7 \times 5 \times 2 + 5$$ 
But now I do not know how to effectively get rid of "$+$".
 [/INST] $$  3600 - 25 = 60^2 - 5^2 = (60 + 5) (60 - 5) = 65 \cdot 55 $$
Then we see $65 = 5 \cdot 13$ and $55 = 5 \cdot 11$
This is usually called Fermat factorization. Start with the first square larger than the number, see if the difference is a square. If that does not work take the square just larger than that. To save time, we can rule out some squares since the difference cannot be $3 \pmod 4$ or $2 \pmod 4.$ In this case, $61^2 - 3575 = 146 \equiv 2 \pmod 4 $ cannot be a square. We would jump to $62^2 - 3575,$ then $64^2 - 3575.$ However, the first time worked.
If I gave you $9991$ the next larger square would be $10000$ and $10000 - 9991 = 9,$ so $9991 = (100 +3)(100-3) = 103 \cdot 97$  
</s>