How do I quickly find the prime factors of big numbers with difficult factors? What I mean by difficult factors is that the usual factors like $2,3,5,7,11$ may not be present. For eg: the prime factors of $4181$ are $37$ and $113$.
How do I find them quickly?
There are many ways to factor numbers. One approach I like is the Lehmer sieve which is a mechanical device that tries to find a pair of numbers $x,y$ such that $n=x^2-y^2$, hence $n=(x-y)(x+y)$ gives a factorization.
A naive version is looking for an $x$ such that $x^2-n$ is a perfect square. We get a lower bound $x\geq \sqrt{4181}>64$. For $x=65,66,\ldots$, we see if $\sqrt{x^2-n}$ is an integer, and $x=75$ is the first (after some effort). $\sqrt{75^2-4181}=38$, so we get factors $4181=37\cdot 113$, which we would need to verify are prime.
We can speed this calculation up by seeing when $x^2-n$ is a quadratic nonresidue modulo various primes. For example, $x^2-4181$ is a square modulo $3$ exactly when $x$ is a multiple of $3$, and it is a square modulo $5$ exactly when $x\equiv 0,\pm 1\pmod{5}$. Putting these together, $x$ must be $0,6,9\pmod{15}$. Even with these few considerations, the $x$'s we would have tried above would only have been $x=66,69,75$ before finding a partial factorization.