Question 467162: D has less than 30 marbles. When he puts them in piles of 3 he has no marble left over. when he puts them in piles of 5 he has 2 left. He has........ marbles.
Found 2 solutions by Edwin McCravy, robertb: Answer by Edwin McCravy(20065) (Show Source):
You can put this solution on YOUR website!
Let N be the number of marbles.
N is a multiple of 3, say 3p
N is also 2 more than a multiple of 5, say 5q + 2
So
N = 3p = 5q + 2
Take the equation:
3p = 5q + 2
3 is the smallest coefficient in absolute value,
so write all the numbers in terms of their
nearest multiple of 3. 5 is nearest to 6, so we
write 5 as 6-1. 2 is nearest to 3 so we write 2 as
3-1
3p = (6-1)q + (3-1)
3p = 6q - q + 3 - 1
Divide through by 3
p = 2q - q/3 + 1 - 1/3
Isolate the fractions
q/3 + 1/3 = 2q + 1 - p
The right side is an integer,
the left side is positive, so
both sides equal to some positive
integer, say A
A = q/3 + 1/3 and A = 2q + 1 - p
Clear of fractions:
3A = q + 1
q = 3A - 1
Substitute in A = 2q + 1 - p
A = 2(3A - 1) + 1 - p
A = 6A - 2 + 1 - p
p = 5A - 1
Substitute p = 5A - 1 and q = 3A - 1 in
0 < N < 30, and since N = 3p
0 < 3p < 30
0 < p < 10
0 < 5A - 1 < 10
1 < 5A < 11
.2 < A < 2.2
and since A is an integer,
1 ≦ A ≦ 2
So A is either 1 or 2
if A = 1
p = 5A - 1
p = 5(1) - 1
p = 5 - 1
p = 4
q = 3A - 1
q = 3(1) - 1
q = 3 - 1
q = 2
N = 3p = 5q + 2
N = 3(4) = 5(2) + 2
N = 12 = 12
----------------
If A = 2
p = 5A - 1
p = 5(2) - 1
p = 10 - 1
p = 9
q = 3A - 1
q = 3(2) - 1
q = 6 - 1
q = 5
N = 3p = 5q + 2
N = 3(9) = 5(5) + 2
N = 27 = 27
---------------------
So there are two solutions, 12 and 27.
Edwin
Answer by robertb(5830) (Show Source):
You can put this solution on YOUR website! The problem is equivalent to solving a linear diophantine equation
3x = 5y + 2, or 3x - 5y = 2.
Bezout's identity says that the equation ax + by = c having one solution (r,s) will have other solutions given by and , where k is from the set of all integers.
Now one solution of 3x - 5y = 2 is (-1,-1), so let r = -1 and s = -1.
Hence 
and ,
For k = -1 ==> x = 4, y = 2;
k = -2 ==> x = 9, y = 5;
k = -3 ==> x = 14, y = 8;...etc.
Therefore there are two possible solutions to the original problem, either
3*4 = 5*2 + 2 = 12, or
3*9 = 5*5 + 2 = 27.
|
|
|