Divide the number by the smallest prime numbers starting from 2
If the number is divisible, record the prime divisor
Keep dividing the quotient by the same prime until it is no longer divisible
Move to the next prime number and repeat
Stop when the quotient becomes 1
The recorded prime numbers are the prime divisors
Check divisibility by primes only up to the square root of the remaining number
If the remaining number is greater than 1, it is also a prime divisor
