document.write( "Question 871318: A census taker stopped at a Hotel Sleep-Inn. The clerk at the desk was a mathematics student with a sense of humor. When asked how many guests were in the hotel, she replied, \" The number is the smallest positive integer that has the following properties:
\n" ); document.write( "When divided by two, the result is a perfect square:
\n" ); document.write( "When divided by three, the result is a perfect cube.\"
\n" ); document.write( "Can you figure out how many guests were in the hotel?
\n" ); document.write( "

Algebra.Com's Answer #525468 by Edwin McCravy(20062)\"\" \"About 
You can put this solution on YOUR website!
\r\n" );
document.write( "To be divisible by both 2 and 3, it must be a number of the form\r\n" );
document.write( "\r\n" );
document.write( "\"2%5Em%2A3%5En\"\r\n" );
document.write( "\r\n" );
document.write( "(since it needs no other prime factors to be as small as possible.)\r\n" );
document.write( "

\n" ); document.write( "When divided by two, the result is a perfect square:
\n" ); document.write( "
\r\n" );
document.write( "So \"2%5E%28m-1%29%2A3%5En\" is a perfect square.\r\n" );
document.write( "\r\n" );
document.write( "Therefore m-1 and n are both even\r\n" );
document.write( "\r\n" );
document.write( "Therefore m is odd and n is even.\r\n" );
document.write( "

\n" ); document.write( "When divided by three, the result is a perfect cube.
\n" ); document.write( "
\r\n" );
document.write( "So \"2%5Em%2A3%5E%28n-1%29\" is a perfect cube.\r\n" );
document.write( "\r\n" );
document.write( "Therefore m and n-1 are both multiples of 3.\r\n" );
document.write( "\r\n" );
document.write( "Therefore m is a multiple of 3 and m is 1 more than a multiple of 3.\r\n" );
document.write( "\r\n" );
document.write( "Putting everything together:\r\n" );
document.write( "\r\n" );
document.write( "m is an odd multiple of 3.  \r\n" );
document.write( "\r\n" );
document.write( "The smallest such positive integer is 3, so m=3\r\n" );
document.write( "\r\n" );
document.write( "n is even and 1 more than a multiple of 3.  \r\n" );
document.write( "\r\n" );
document.write( "The smallest such positive integer is 4, so n=4.\r\n" );
document.write( "\r\n" );
document.write( "\"2%5Em%2A3%5En\"\"%22%22=%22%22\"\"2%5E3%2A3%5E4\"\"%22%22=%22%22\"\"8%2A81\"\"%22%22=%22%22\"\"648\"  \r\n" );
document.write( "\r\n" );
document.write( "So there are 648 guests.\r\n" );
document.write( "\r\n" );
document.write( "Checking:\r\n" );
document.write( "\r\n" );
document.write( "648÷2 = 324 = 18²\r\n" );
document.write( "648÷3 = 216 = 6³\r\n" );
document.write( "\r\n" );
document.write( "Edwin
\n" ); document.write( "
\n" );