Possibilty of a number $n$ to be a multiple of $x$ that has a remainder of $y$
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
Is there a formula or solution for this :
"$n$ is a number that is a multiple of $x$ and when divided by $b$ has remainder of $y$".
Is there a fast way to finding this number?
linear-algebra arithmetic puzzle
add a comment |Â
up vote
1
down vote
favorite
Is there a formula or solution for this :
"$n$ is a number that is a multiple of $x$ and when divided by $b$ has remainder of $y$".
Is there a fast way to finding this number?
linear-algebra arithmetic puzzle
So you are asking for a solution to $axequiv ymodb$? Why would you assume there is only one solution?
â Rushabh Mehta
Aug 18 at 2:33
Have you tried plugging in specific numbers and seeing what happens? Let's say $n = 40$ which is a multiple of $x = 10$ and has a remainder of $y = 3$ when divided by... what?
â Robert Soupe
Aug 19 at 16:11
Yes and its been tricky lets say you have all what you need except for the $n$.
â MMJM
Aug 20 at 9:39
@Rushabh I'm not asking for a one specific solution. What I want is a fast method for finding n.
â MMJM
Aug 20 at 9:41
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Is there a formula or solution for this :
"$n$ is a number that is a multiple of $x$ and when divided by $b$ has remainder of $y$".
Is there a fast way to finding this number?
linear-algebra arithmetic puzzle
Is there a formula or solution for this :
"$n$ is a number that is a multiple of $x$ and when divided by $b$ has remainder of $y$".
Is there a fast way to finding this number?
linear-algebra arithmetic puzzle
edited Aug 19 at 16:08
Robert Soupe
10.1k21947
10.1k21947
asked Aug 18 at 2:13
MMJM
205
205
So you are asking for a solution to $axequiv ymodb$? Why would you assume there is only one solution?
â Rushabh Mehta
Aug 18 at 2:33
Have you tried plugging in specific numbers and seeing what happens? Let's say $n = 40$ which is a multiple of $x = 10$ and has a remainder of $y = 3$ when divided by... what?
â Robert Soupe
Aug 19 at 16:11
Yes and its been tricky lets say you have all what you need except for the $n$.
â MMJM
Aug 20 at 9:39
@Rushabh I'm not asking for a one specific solution. What I want is a fast method for finding n.
â MMJM
Aug 20 at 9:41
add a comment |Â
So you are asking for a solution to $axequiv ymodb$? Why would you assume there is only one solution?
â Rushabh Mehta
Aug 18 at 2:33
Have you tried plugging in specific numbers and seeing what happens? Let's say $n = 40$ which is a multiple of $x = 10$ and has a remainder of $y = 3$ when divided by... what?
â Robert Soupe
Aug 19 at 16:11
Yes and its been tricky lets say you have all what you need except for the $n$.
â MMJM
Aug 20 at 9:39
@Rushabh I'm not asking for a one specific solution. What I want is a fast method for finding n.
â MMJM
Aug 20 at 9:41
So you are asking for a solution to $axequiv ymodb$? Why would you assume there is only one solution?
â Rushabh Mehta
Aug 18 at 2:33
So you are asking for a solution to $axequiv ymodb$? Why would you assume there is only one solution?
â Rushabh Mehta
Aug 18 at 2:33
Have you tried plugging in specific numbers and seeing what happens? Let's say $n = 40$ which is a multiple of $x = 10$ and has a remainder of $y = 3$ when divided by... what?
â Robert Soupe
Aug 19 at 16:11
Have you tried plugging in specific numbers and seeing what happens? Let's say $n = 40$ which is a multiple of $x = 10$ and has a remainder of $y = 3$ when divided by... what?
â Robert Soupe
Aug 19 at 16:11
Yes and its been tricky lets say you have all what you need except for the $n$.
â MMJM
Aug 20 at 9:39
Yes and its been tricky lets say you have all what you need except for the $n$.
â MMJM
Aug 20 at 9:39
@Rushabh I'm not asking for a one specific solution. What I want is a fast method for finding n.
â MMJM
Aug 20 at 9:41
@Rushabh I'm not asking for a one specific solution. What I want is a fast method for finding n.
â MMJM
Aug 20 at 9:41
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
The short answer is "No". Here is the long answer.
$n equiv 0 pmod x implies n = alpha x textfor some integer $alpha$$
$n equiv y pmod b implies alpha x equiv y pmod b$
Let $g = gcd(x, b)$. Then there is no solution unless $g mid y$.
If $g mid y$...
Let $X = dfrac xg, quad Y = dfrac yg, quad B = dfrac bg.$
Then $alpha X equiv Y pmod B$ and $gcd(X,B) = 1$.
So there exists integers $xi, beta$ such that $xi X + beta B = 1$.
Then $xi Y equiv alpha xi X equiv alpha - alpha beta B equiv alpha pmod B$.
That is $alpha equiv xi Y pmod B$
Example.
Find a number $n$ that is a multiple of $20$ and leaves a remainder of $24$ when divided by $34$.
We have $x = 20, quad y=24, quad b=34$.
$n equiv 0 pmod20 implies n = 20 alpha textfor some integer $alpha$$.
$n equiv 24 pmod34 implies 20 alpha equiv 24 pmod34$
Let $g = gcd(20, 34) = 2$. Then there is no solution unless $2 mid 24$. Which it does.
Let $X = dfrac202 = 10, quad Y = dfrac242=12, quad B = dfrac342=17.$
Then $10 alpha equiv 12 pmod17$ and $gcd(10,17) = 1$.
So there exists integers $xi, beta$ such that $10 xi + 17 beta = 1$.
beginarrayr
& 17 & 1 & 0 & 17 = (1)17 + (0)10\
-1 & 10 & 0 & 1 & 10 = (0)17 + (1)10\
hline
-1 & 7 & 1 & -1 & 7 = (1)17 + (-1)10\
-2 & 3 & -1 & 2 & 3 = (-1)17 + (2)10 \
hline
& 1 & 3 & -5 & 1 = (3)17 + (-5)10
endarray
We find $xi = 3, quad beta = -5$
So $alpha equiv -5 cdot 12 = -60 pmod17 = 8 pmod17$
and $n = 20alpha = 160$
CHECK:
$160$ is a multiple of $20$
$160 = 4 cdot 34 + 24$
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
The short answer is "No". Here is the long answer.
$n equiv 0 pmod x implies n = alpha x textfor some integer $alpha$$
$n equiv y pmod b implies alpha x equiv y pmod b$
Let $g = gcd(x, b)$. Then there is no solution unless $g mid y$.
If $g mid y$...
Let $X = dfrac xg, quad Y = dfrac yg, quad B = dfrac bg.$
Then $alpha X equiv Y pmod B$ and $gcd(X,B) = 1$.
So there exists integers $xi, beta$ such that $xi X + beta B = 1$.
Then $xi Y equiv alpha xi X equiv alpha - alpha beta B equiv alpha pmod B$.
That is $alpha equiv xi Y pmod B$
Example.
Find a number $n$ that is a multiple of $20$ and leaves a remainder of $24$ when divided by $34$.
We have $x = 20, quad y=24, quad b=34$.
$n equiv 0 pmod20 implies n = 20 alpha textfor some integer $alpha$$.
$n equiv 24 pmod34 implies 20 alpha equiv 24 pmod34$
Let $g = gcd(20, 34) = 2$. Then there is no solution unless $2 mid 24$. Which it does.
Let $X = dfrac202 = 10, quad Y = dfrac242=12, quad B = dfrac342=17.$
Then $10 alpha equiv 12 pmod17$ and $gcd(10,17) = 1$.
So there exists integers $xi, beta$ such that $10 xi + 17 beta = 1$.
beginarrayr
& 17 & 1 & 0 & 17 = (1)17 + (0)10\
-1 & 10 & 0 & 1 & 10 = (0)17 + (1)10\
hline
-1 & 7 & 1 & -1 & 7 = (1)17 + (-1)10\
-2 & 3 & -1 & 2 & 3 = (-1)17 + (2)10 \
hline
& 1 & 3 & -5 & 1 = (3)17 + (-5)10
endarray
We find $xi = 3, quad beta = -5$
So $alpha equiv -5 cdot 12 = -60 pmod17 = 8 pmod17$
and $n = 20alpha = 160$
CHECK:
$160$ is a multiple of $20$
$160 = 4 cdot 34 + 24$
add a comment |Â
up vote
1
down vote
accepted
The short answer is "No". Here is the long answer.
$n equiv 0 pmod x implies n = alpha x textfor some integer $alpha$$
$n equiv y pmod b implies alpha x equiv y pmod b$
Let $g = gcd(x, b)$. Then there is no solution unless $g mid y$.
If $g mid y$...
Let $X = dfrac xg, quad Y = dfrac yg, quad B = dfrac bg.$
Then $alpha X equiv Y pmod B$ and $gcd(X,B) = 1$.
So there exists integers $xi, beta$ such that $xi X + beta B = 1$.
Then $xi Y equiv alpha xi X equiv alpha - alpha beta B equiv alpha pmod B$.
That is $alpha equiv xi Y pmod B$
Example.
Find a number $n$ that is a multiple of $20$ and leaves a remainder of $24$ when divided by $34$.
We have $x = 20, quad y=24, quad b=34$.
$n equiv 0 pmod20 implies n = 20 alpha textfor some integer $alpha$$.
$n equiv 24 pmod34 implies 20 alpha equiv 24 pmod34$
Let $g = gcd(20, 34) = 2$. Then there is no solution unless $2 mid 24$. Which it does.
Let $X = dfrac202 = 10, quad Y = dfrac242=12, quad B = dfrac342=17.$
Then $10 alpha equiv 12 pmod17$ and $gcd(10,17) = 1$.
So there exists integers $xi, beta$ such that $10 xi + 17 beta = 1$.
beginarrayr
& 17 & 1 & 0 & 17 = (1)17 + (0)10\
-1 & 10 & 0 & 1 & 10 = (0)17 + (1)10\
hline
-1 & 7 & 1 & -1 & 7 = (1)17 + (-1)10\
-2 & 3 & -1 & 2 & 3 = (-1)17 + (2)10 \
hline
& 1 & 3 & -5 & 1 = (3)17 + (-5)10
endarray
We find $xi = 3, quad beta = -5$
So $alpha equiv -5 cdot 12 = -60 pmod17 = 8 pmod17$
and $n = 20alpha = 160$
CHECK:
$160$ is a multiple of $20$
$160 = 4 cdot 34 + 24$
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
The short answer is "No". Here is the long answer.
$n equiv 0 pmod x implies n = alpha x textfor some integer $alpha$$
$n equiv y pmod b implies alpha x equiv y pmod b$
Let $g = gcd(x, b)$. Then there is no solution unless $g mid y$.
If $g mid y$...
Let $X = dfrac xg, quad Y = dfrac yg, quad B = dfrac bg.$
Then $alpha X equiv Y pmod B$ and $gcd(X,B) = 1$.
So there exists integers $xi, beta$ such that $xi X + beta B = 1$.
Then $xi Y equiv alpha xi X equiv alpha - alpha beta B equiv alpha pmod B$.
That is $alpha equiv xi Y pmod B$
Example.
Find a number $n$ that is a multiple of $20$ and leaves a remainder of $24$ when divided by $34$.
We have $x = 20, quad y=24, quad b=34$.
$n equiv 0 pmod20 implies n = 20 alpha textfor some integer $alpha$$.
$n equiv 24 pmod34 implies 20 alpha equiv 24 pmod34$
Let $g = gcd(20, 34) = 2$. Then there is no solution unless $2 mid 24$. Which it does.
Let $X = dfrac202 = 10, quad Y = dfrac242=12, quad B = dfrac342=17.$
Then $10 alpha equiv 12 pmod17$ and $gcd(10,17) = 1$.
So there exists integers $xi, beta$ such that $10 xi + 17 beta = 1$.
beginarrayr
& 17 & 1 & 0 & 17 = (1)17 + (0)10\
-1 & 10 & 0 & 1 & 10 = (0)17 + (1)10\
hline
-1 & 7 & 1 & -1 & 7 = (1)17 + (-1)10\
-2 & 3 & -1 & 2 & 3 = (-1)17 + (2)10 \
hline
& 1 & 3 & -5 & 1 = (3)17 + (-5)10
endarray
We find $xi = 3, quad beta = -5$
So $alpha equiv -5 cdot 12 = -60 pmod17 = 8 pmod17$
and $n = 20alpha = 160$
CHECK:
$160$ is a multiple of $20$
$160 = 4 cdot 34 + 24$
The short answer is "No". Here is the long answer.
$n equiv 0 pmod x implies n = alpha x textfor some integer $alpha$$
$n equiv y pmod b implies alpha x equiv y pmod b$
Let $g = gcd(x, b)$. Then there is no solution unless $g mid y$.
If $g mid y$...
Let $X = dfrac xg, quad Y = dfrac yg, quad B = dfrac bg.$
Then $alpha X equiv Y pmod B$ and $gcd(X,B) = 1$.
So there exists integers $xi, beta$ such that $xi X + beta B = 1$.
Then $xi Y equiv alpha xi X equiv alpha - alpha beta B equiv alpha pmod B$.
That is $alpha equiv xi Y pmod B$
Example.
Find a number $n$ that is a multiple of $20$ and leaves a remainder of $24$ when divided by $34$.
We have $x = 20, quad y=24, quad b=34$.
$n equiv 0 pmod20 implies n = 20 alpha textfor some integer $alpha$$.
$n equiv 24 pmod34 implies 20 alpha equiv 24 pmod34$
Let $g = gcd(20, 34) = 2$. Then there is no solution unless $2 mid 24$. Which it does.
Let $X = dfrac202 = 10, quad Y = dfrac242=12, quad B = dfrac342=17.$
Then $10 alpha equiv 12 pmod17$ and $gcd(10,17) = 1$.
So there exists integers $xi, beta$ such that $10 xi + 17 beta = 1$.
beginarrayr
& 17 & 1 & 0 & 17 = (1)17 + (0)10\
-1 & 10 & 0 & 1 & 10 = (0)17 + (1)10\
hline
-1 & 7 & 1 & -1 & 7 = (1)17 + (-1)10\
-2 & 3 & -1 & 2 & 3 = (-1)17 + (2)10 \
hline
& 1 & 3 & -5 & 1 = (3)17 + (-5)10
endarray
We find $xi = 3, quad beta = -5$
So $alpha equiv -5 cdot 12 = -60 pmod17 = 8 pmod17$
and $n = 20alpha = 160$
CHECK:
$160$ is a multiple of $20$
$160 = 4 cdot 34 + 24$
answered Aug 20 at 15:10
steven gregory
16.6k22055
16.6k22055
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2886348%2fpossibilty-of-a-number-n-to-be-a-multiple-of-x-that-has-a-remainder-of-y%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
So you are asking for a solution to $axequiv ymodb$? Why would you assume there is only one solution?
â Rushabh Mehta
Aug 18 at 2:33
Have you tried plugging in specific numbers and seeing what happens? Let's say $n = 40$ which is a multiple of $x = 10$ and has a remainder of $y = 3$ when divided by... what?
â Robert Soupe
Aug 19 at 16:11
Yes and its been tricky lets say you have all what you need except for the $n$.
â MMJM
Aug 20 at 9:39
@Rushabh I'm not asking for a one specific solution. What I want is a fast method for finding n.
â MMJM
Aug 20 at 9:41