document.write( "Question 596166: Find all the positive integers for which n!+5 is a perfect cube \n" ); document.write( "
Algebra.Com's Answer #377587 by richard1234(7193)\"\" \"About 
You can put this solution on YOUR website!
Suppose . We know n = 5 works (125 is 5^3).\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "If n >= 10 we can show that n! + 5 is never a cube. This is because n! will be divisible by 100, so n! + 5 will be 5 mod 100. Therefore k^3 must also be 5 mod 100, which can never be true (since k^3 will have only one factor of 5, and it needs 0 or 3).\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Therefore n must be less than or equal to 9. A quick check shows that n = 5 is the only possible n.
\n" ); document.write( "
\n" );