I need some problems conceivable by middle school students, which are not easy to solve unless the prime factorization of some number is known.
An example: It's not easy to know wheter $n$ can be represented as sum of two squares or not, but if we know what is prime factorization of $n$, then it's very easy to solve the problem (using Fermat's two square theorem). Here its not important that the students can understand the proof of the theorem. The purpose is to show how prime factorization helps solving the problem.
Problem: Find the sum of the divisors of a large number.
There is a simple formula if you know the prime factorization.