document.write( "Question 1146503: There is quite a pile of playing cards sitting at my house. A discovery I have
\n" ); document.write( "made is as follows. If all the cards are dealt to all the people, then:\r
\n" ); document.write( "\n" ); document.write( "if 2 people are playing cards one card will be left over.
\n" ); document.write( "if 3 people are playing cards 2 cards will be left over.
\n" ); document.write( " if 4 people are playing cards 3 cards will be left over. 
\n" ); document.write( "if 5 people are playing cards. 4 cards will be left over.
\n" ); document.write( "if 6 people are playing cards 5 cards will be left over.
\n" ); document.write( "If seven people are playing cards no cards will be left over. 
\n" ); document.write( "if I have the minimum amount of cards to satisfy the above conditions how many
\n" ); document.write( "cards do I have?
\n" ); document.write( "
\n" ); document.write( "

Algebra.Com's Answer #768330 by Edwin McCravy(20060)\"\" \"About 
You can put this solution on YOUR website!
\r\n" );
document.write( "There must be positive integers A,B,C,D,E,F, such that\r\n" );
document.write( "\r\n" );
document.write( "2A+1 = 3B+2 = 4C+3 = 5D+4 = 6E+5 = 7F = the answer\r\n" );
document.write( "\r\n" );
document.write( "We will solve linear Diophantine equations by the standard rules, which are:\r\n" );
document.write( "\r\n" );
document.write( "1. Find the least coefficient of a variable in absolute value, say it's P.\r\n" );
document.write( "2. Write all other numerical integers in terms of their nearest multiple of P.\r\n" );
document.write( "3. Divide all terms by P.\r\n" );
document.write( "4. Move all fractions to one side, and all non-fractions to the other side.\r\n" );
document.write( "5. Set both sides equal to a new integer, say, Q, making 2 equations.\r\n" );
document.write( "6. This will give two new Diophantine equations.  \r\n" );
document.write( "6. For the side that has the fractions, clear it of its fractions and solve.\r\n" );
document.write( "7. Substitute to find F in terms of the new integer.\r\n" );
document.write( "\r\n" );
document.write( "    6E + 5 = 7F\r\n" );
document.write( "6E + 6 - 1 = 6F + F\r\n" );
document.write( "E + 1 -1/6 = F + F/6\r\n" );
document.write( " E + 1 - F = F/6 + 1/6 = G \r\n" );
document.write( " E + 1 - F = G;  F + 1 = 6G\r\n" );
document.write( "                     F = 6G - 1\r\n" );
document.write( "E + 1 - (6G - 1) = G\r\n" );
document.write( "  E + 1 - 6G + 1 = G\r\n" );
document.write( "     E + 2  - 6G = G\r\n" );
document.write( "               E = 7G - 2\r\n" );
document.write( "          6E + 5 = 7F\r\n" );
document.write( "   6(7G - 2) + 5 = 7F\r\n" );
document.write( "    42G - 12 + 5 = 7F\r\n" );
document.write( "         42G - 7 = 7F\r\n" );
document.write( "          6G - 1 = F\r\n" );
document.write( "\r\n" );
document.write( "     5D + 4 = 7F\r\n" );
document.write( "     5D + 4 = 7(6G - 1)\r\n" );
document.write( "     5D + 4 = 42G - 7\r\n" );
document.write( "    5D + 11 = 42G \r\n" );
document.write( "5D + 10 + 1 = 40G + 2G\r\n" );
document.write( "D + 2 + 1/5 = 8G + 2G/5\r\n" );
document.write( " D + 2 - 8G = 2G/5 - 1/5 = H\r\n" );
document.write( " D + 2 - 8G = H;   2G/5 - 1/5 = H\r\n" );
document.write( "                       2G - 1 = 5H\r\n" );
document.write( "                       2G - 1 = 4H + H\r\n" );
document.write( "                      G - 1/2 = 2H + H/2\r\n" );
document.write( "                       G - 2H = H/2 + 1/2 = J\r\n" );
document.write( "                  G - 2H = J;  H + 1 = 2J\r\n" );
document.write( "                                   H = 2J - 1\r\n" );
document.write( "           G - 2(2J - 1) = J  \r\n" );
document.write( "              G - 4J + 2 = J\r\n" );
document.write( "                   G + 2 = 5J\r\n" );
document.write( "                       G = 5J - 2\r\n" );
document.write( "\r\n" );
document.write( "F = 6G - 1\r\n" );
document.write( "F = 6(5J - 2) - 1\r\n" );
document.write( "F = 30J - 12 - 1\r\n" );
document.write( "F = 30J - 13\r\n" );
document.write( "\r\n" );
document.write( "             4C + 3 = 7F\r\n" );
document.write( "             4C + 3 = 7(30J - 13)\r\n" );
document.write( "             4C + 3 = 210J - 91\r\n" );
document.write( "            4C + 94 = 210J\r\n" );
document.write( "        4C + 92 + 2 = 208J + 2J\r\n" );
document.write( "       C + 23 + 2/4 = 52J + 2J/4\r\n" );
document.write( "       C + 23 - 52J = 2J/4 - 2/4 = J/2 - 1/2 = K\r\n" );
document.write( "       C + 23 - 52J = K;               J - 1 = 2K\r\n" );
document.write( "                                           J = 2K + 1\r\n" );
document.write( "C + 23 - 52(2K + 1) = K\r\n" );
document.write( " C + 23 - 105K - 52 = K\r\n" );
document.write( "      C - 29 - 104K = K\r\n" );
document.write( "             C - 29 = 105K\r\n" );
document.write( "                  C = 105K + 29\r\n" );
document.write( "\r\n" );
document.write( "          4C + 3 = 7F\r\n" );
document.write( "4(105K + 29) + 3 = 7F\r\n" );
document.write( "  420K + 116 + 3 = 7F\r\n" );
document.write( "      420K + 119 = 7F\r\n" );
document.write( "\r\n" );
document.write( "We can stop here, since 7F is the answer, and it's odd, so if we divide by 2,\r\n" );
document.write( "it will leave remainder 1. The minimum positive value for 7F is when K = 0.\r\n" );
document.write( "\r\n" );
document.write( "Answer = 420(0) + 119 = 119\r\n" );
document.write( "\r\n" );
document.write( "Checking: \r\n" );
document.write( " \r\n" );
document.write( "7)119 gives 17 with remainder 0\r\n" );
document.write( "\r\n" );
document.write( "6)119 gives 19 with remainder 5\r\n" );
document.write( "\r\n" );
document.write( "5)119 gives 23 with remainder 4\r\n" );
document.write( "\r\n" );
document.write( "4)119 gives 29 with remainder 3\r\n" );
document.write( "\r\n" );
document.write( "3)119 gives 39 with remainder 2\r\n" );
document.write( "\r\n" );
document.write( "2)119 gives 59 with remainder 1\r\n" );
document.write( "\r\n" );
document.write( "Edwin
\n" ); document.write( "
\n" );