When Joyce counts the pennies in her bank by fives, she has one left over. So she has 5N+1 pennies, where N is some positive integer
When she counts them by threes, there are two left over.So she has 3M+2 pennies, where M is some other positive integer.
So 3M+2 = 5N+1
3M-5M = -1
Write 5 in terms of its nearest multiple of 3, which is 6
3M-(6-1)N = -1
3M-6N+N = -1
Divide through by 3
M-2N+N/3 = -1/3
Get fractions left, whole numbers right:
N/3+1/3 = 2N-M
Right side is a positive integer, so the right side is too.
Let that positive integer by A
N/3+1/3 = A; 2N-M = A
N+1 = 3A;
N = 3A-1;
Substitute in 2N-M = A
2(3A-1)-M = A
6A-2-M = A
5A = M+2
5A-2 = M
So N = 3A-1 and M = 5A-2 What is the least possible number of pennies in the bank?The least possible value of A to make N the
least positive integer is A=1.
So N = 3A-1 = 3(1)-1 = 3-1 = 2 and M = 5A-2 = 5(1)-2 = 5-2 = 3
So she has 5N+1 pennies = 5(2)+1 = 10+1 = 11 pennies
As a check:
She also has 3M+2 pennies = 3(3)+2 = 11 pennies.
And when we divide 11 by 5, we get 1 remainder, and
when we divide 11 by 3, we get 2 remainder.
So 11 pennies is correct.
Edwin