# Finding primes given a condition

by galois427
Tags: condition, primes
 Sci Advisor HW Helper P: 1,123 This is really quite easy as p^2 can only be p times p or 1 times p^2. Now, $$n^3 + 1 = (n + 1)(n^2 - n + 1)$$ So one possible solution is where one of the factors is equal to 1 and the other is equal to p^2. Or when they are both equal to each other. Test those out and you should find all the possible solutions for n.