document.write( "Question 1040980: When Joyce counts the pennies in her bank by fives, she has one left over. When she counts them by threes, there are two left over. What is the least possible number of pennies in the bank? \n" ); document.write( "
Algebra.Com's Answer #655933 by robertb(5830)\"\" \"About 
You can put this solution on YOUR website!
Let N = the possible number of pennies of Joyce in the bank.\r
\n" ); document.write( "\n" ); document.write( "==> N = 5r + 1 for some non-negative integer r.
\n" ); document.write( "==> N = 3s + 2 for some non-negative integer s.\r
\n" ); document.write( "\n" ); document.write( "==> 5r + 1 = 3s + 2 ===> 5r - 3s = 1, \r
\n" ); document.write( "\n" ); document.write( "which is a linear Diophantine equation.\r
\n" ); document.write( "\n" ); document.write( "Now any linear Diophantine equation \r
\n" ); document.write( "\n" ); document.write( "ar - bs = c \r
\n" ); document.write( "\n" ); document.write( "has an integer solution in r and s if and only if gcd(a,b) divides c, and that all integer solutions are of the form\r
\n" ); document.write( "\n" ); document.write( "\"r+=+r%5B0%5D+-+%28bk%29%2Fgcd%28a%2Cb%29\" and \"s+=+s%5B0%5D+%2B+%28ak%29%2Fgcd%28a%2Cb%29\", where \"r%5B0%5D\" and \"s%5B0%5D\" are particular solutions.\r
\n" ); document.write( "\n" ); document.write( "gcd(5,3) = 1 divides c = 1 ==> there are general solutions for the DE equation.
\n" ); document.write( "A particular solution to this equation is \"r%5B0%5D+=+2\" and \"s%5B0%5D+=+3\".\r
\n" ); document.write( "\n" ); document.write( "==> r = 2 + 3k and s = 3 + 5k,
\n" ); document.write( "for k = 0, 1, 2, 3, 4, ...
\n" ); document.write( "are the general solutions.\r
\n" ); document.write( "\n" ); document.write( "r = 2 and s = 3 (when k = 0) give the lowest possible value for N which is \r
\n" ); document.write( "\n" ); document.write( "N = 11,\r
\n" ); document.write( "\n" ); document.write( "and therefore 11 is the least possible number of pennies in the bank.
\n" ); document.write( "
\n" );