Factorizing numbers with the Gauss sum technique