Gregmat Question on Factors

Hi, the above question is covered in the Arithmetic videos and Greg solves it through the brute force method. However, that seems too time consuming for me considering math isn’t my strong suit. I was wondering if there are any tricks for a sum like this.

There are two cases to consider:

  1. The number is an odd prime cubed because the factors of said number would strictly be \{1, p, p^2, p^3\}

  2. An odd number which can be written out as a product of two distinct prime numbers.

Can you take it from here?

Yes, thanks a lot!