Quadratic congruences in which modulus is divisible by constant term

Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
There are two similar congruences:
$$
x^2-6xequiv16pmod512\
y^2-yequiv16pmod512
$$
It is easy to see that the $gcd$ of all three parts in both of them is $16$, $x$ and $x-6$ are even and one of $y$ and $y-1$ is odd. After also noticing $xnotequiv x-6pmod4$ we have
$$
x equiv 0 pmod8\
or\
x-6 equiv 0 pmod8
$$
$$
y equiv 0 pmod16\
or\
y-1 equiv 0 pmod16
$$
Making substitutions $x=8n,x=8n+6,y=16m,y=16m+1$ I obtained congruences with modulus $32$, but couldn't make it any further. I also discovered that the first congruence can be rewritten as $(x+2)(x-8) equiv 0pmod512$ while $-2$ and $8$ appear to be its solutions. However, it's still not clear to me whether there are more of them.
What am I missing? How can such congruences be solved?
elementary-number-theory modular-arithmetic congruences
add a comment |Â
up vote
1
down vote
favorite
There are two similar congruences:
$$
x^2-6xequiv16pmod512\
y^2-yequiv16pmod512
$$
It is easy to see that the $gcd$ of all three parts in both of them is $16$, $x$ and $x-6$ are even and one of $y$ and $y-1$ is odd. After also noticing $xnotequiv x-6pmod4$ we have
$$
x equiv 0 pmod8\
or\
x-6 equiv 0 pmod8
$$
$$
y equiv 0 pmod16\
or\
y-1 equiv 0 pmod16
$$
Making substitutions $x=8n,x=8n+6,y=16m,y=16m+1$ I obtained congruences with modulus $32$, but couldn't make it any further. I also discovered that the first congruence can be rewritten as $(x+2)(x-8) equiv 0pmod512$ while $-2$ and $8$ appear to be its solutions. However, it's still not clear to me whether there are more of them.
What am I missing? How can such congruences be solved?
elementary-number-theory modular-arithmetic congruences
The first is true exactly when $xequiv -2,8pmod 256$, since you just want $512mid(x+2)(x-8)$ and both of those terms must be even, but only one of them can have higher powers of $2$ as factors.
â Thomas Andrews
Dec 27 '14 at 3:12
@Thomas Ah, one of the terms is necessarily divisible by 256, and it's only achievable when it is equivalent to zero. Easy indeed. Thanks!
â Edacious
Dec 27 '14 at 3:23
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
There are two similar congruences:
$$
x^2-6xequiv16pmod512\
y^2-yequiv16pmod512
$$
It is easy to see that the $gcd$ of all three parts in both of them is $16$, $x$ and $x-6$ are even and one of $y$ and $y-1$ is odd. After also noticing $xnotequiv x-6pmod4$ we have
$$
x equiv 0 pmod8\
or\
x-6 equiv 0 pmod8
$$
$$
y equiv 0 pmod16\
or\
y-1 equiv 0 pmod16
$$
Making substitutions $x=8n,x=8n+6,y=16m,y=16m+1$ I obtained congruences with modulus $32$, but couldn't make it any further. I also discovered that the first congruence can be rewritten as $(x+2)(x-8) equiv 0pmod512$ while $-2$ and $8$ appear to be its solutions. However, it's still not clear to me whether there are more of them.
What am I missing? How can such congruences be solved?
elementary-number-theory modular-arithmetic congruences
There are two similar congruences:
$$
x^2-6xequiv16pmod512\
y^2-yequiv16pmod512
$$
It is easy to see that the $gcd$ of all three parts in both of them is $16$, $x$ and $x-6$ are even and one of $y$ and $y-1$ is odd. After also noticing $xnotequiv x-6pmod4$ we have
$$
x equiv 0 pmod8\
or\
x-6 equiv 0 pmod8
$$
$$
y equiv 0 pmod16\
or\
y-1 equiv 0 pmod16
$$
Making substitutions $x=8n,x=8n+6,y=16m,y=16m+1$ I obtained congruences with modulus $32$, but couldn't make it any further. I also discovered that the first congruence can be rewritten as $(x+2)(x-8) equiv 0pmod512$ while $-2$ and $8$ appear to be its solutions. However, it's still not clear to me whether there are more of them.
What am I missing? How can such congruences be solved?
elementary-number-theory modular-arithmetic congruences
asked Dec 27 '14 at 2:57
Edacious
507
507
The first is true exactly when $xequiv -2,8pmod 256$, since you just want $512mid(x+2)(x-8)$ and both of those terms must be even, but only one of them can have higher powers of $2$ as factors.
â Thomas Andrews
Dec 27 '14 at 3:12
@Thomas Ah, one of the terms is necessarily divisible by 256, and it's only achievable when it is equivalent to zero. Easy indeed. Thanks!
â Edacious
Dec 27 '14 at 3:23
add a comment |Â
The first is true exactly when $xequiv -2,8pmod 256$, since you just want $512mid(x+2)(x-8)$ and both of those terms must be even, but only one of them can have higher powers of $2$ as factors.
â Thomas Andrews
Dec 27 '14 at 3:12
@Thomas Ah, one of the terms is necessarily divisible by 256, and it's only achievable when it is equivalent to zero. Easy indeed. Thanks!
â Edacious
Dec 27 '14 at 3:23
The first is true exactly when $xequiv -2,8pmod 256$, since you just want $512mid(x+2)(x-8)$ and both of those terms must be even, but only one of them can have higher powers of $2$ as factors.
â Thomas Andrews
Dec 27 '14 at 3:12
The first is true exactly when $xequiv -2,8pmod 256$, since you just want $512mid(x+2)(x-8)$ and both of those terms must be even, but only one of them can have higher powers of $2$ as factors.
â Thomas Andrews
Dec 27 '14 at 3:12
@Thomas Ah, one of the terms is necessarily divisible by 256, and it's only achievable when it is equivalent to zero. Easy indeed. Thanks!
â Edacious
Dec 27 '14 at 3:23
@Thomas Ah, one of the terms is necessarily divisible by 256, and it's only achievable when it is equivalent to zero. Easy indeed. Thanks!
â Edacious
Dec 27 '14 at 3:23
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
The first one is easy. You need $(x-8)(x+2)$ divisible by $512$. Both $x+8$ and $x-2$ are even, but only one of them can have higher powers of $2$ as factors. Thus, $xequiv 8pmod 256$ or $xequiv -2pmod256$.
The second requires more care.
First assuming $yequiv 0pmod16$ you have $y=16y_0$ and $$16y_0^2=y_0+1pmod32$$
Since $16y_0^2$ is even, $y_0+1$ is even, so $y_0$ is odd. When $y_0$ odd, $16y_0^2equiv 16pmod32$, so $y_0equiv 15pmod 32=$ and $yequiv 16cdot 15=240pmod512$.
Second, assume $y=16y_0+1$. Then $$16y_0^2 equiv 1-y_0pmod32$$ So $y_0$ is odd, $1-y_0equiv 16pmod 32$, or $y_0equiv 17pmod32$. So $yequiv 16cdot 17+1=273pmod512$
So the two solutions are $yequiv 240,273pmod512$.
Note that the sum of these two values is $1pmod512$, as befits the two roots of any quadratic equation of the form $x^2-x+C=0$.
Indeed, we have $(y-240)(y-273)equiv y^2-y-16pmod512$, so these are the only solutions, since only one of $y-240$ and $y-273$ can be even.
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 first one is easy. You need $(x-8)(x+2)$ divisible by $512$. Both $x+8$ and $x-2$ are even, but only one of them can have higher powers of $2$ as factors. Thus, $xequiv 8pmod 256$ or $xequiv -2pmod256$.
The second requires more care.
First assuming $yequiv 0pmod16$ you have $y=16y_0$ and $$16y_0^2=y_0+1pmod32$$
Since $16y_0^2$ is even, $y_0+1$ is even, so $y_0$ is odd. When $y_0$ odd, $16y_0^2equiv 16pmod32$, so $y_0equiv 15pmod 32=$ and $yequiv 16cdot 15=240pmod512$.
Second, assume $y=16y_0+1$. Then $$16y_0^2 equiv 1-y_0pmod32$$ So $y_0$ is odd, $1-y_0equiv 16pmod 32$, or $y_0equiv 17pmod32$. So $yequiv 16cdot 17+1=273pmod512$
So the two solutions are $yequiv 240,273pmod512$.
Note that the sum of these two values is $1pmod512$, as befits the two roots of any quadratic equation of the form $x^2-x+C=0$.
Indeed, we have $(y-240)(y-273)equiv y^2-y-16pmod512$, so these are the only solutions, since only one of $y-240$ and $y-273$ can be even.
add a comment |Â
up vote
1
down vote
accepted
The first one is easy. You need $(x-8)(x+2)$ divisible by $512$. Both $x+8$ and $x-2$ are even, but only one of them can have higher powers of $2$ as factors. Thus, $xequiv 8pmod 256$ or $xequiv -2pmod256$.
The second requires more care.
First assuming $yequiv 0pmod16$ you have $y=16y_0$ and $$16y_0^2=y_0+1pmod32$$
Since $16y_0^2$ is even, $y_0+1$ is even, so $y_0$ is odd. When $y_0$ odd, $16y_0^2equiv 16pmod32$, so $y_0equiv 15pmod 32=$ and $yequiv 16cdot 15=240pmod512$.
Second, assume $y=16y_0+1$. Then $$16y_0^2 equiv 1-y_0pmod32$$ So $y_0$ is odd, $1-y_0equiv 16pmod 32$, or $y_0equiv 17pmod32$. So $yequiv 16cdot 17+1=273pmod512$
So the two solutions are $yequiv 240,273pmod512$.
Note that the sum of these two values is $1pmod512$, as befits the two roots of any quadratic equation of the form $x^2-x+C=0$.
Indeed, we have $(y-240)(y-273)equiv y^2-y-16pmod512$, so these are the only solutions, since only one of $y-240$ and $y-273$ can be even.
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
The first one is easy. You need $(x-8)(x+2)$ divisible by $512$. Both $x+8$ and $x-2$ are even, but only one of them can have higher powers of $2$ as factors. Thus, $xequiv 8pmod 256$ or $xequiv -2pmod256$.
The second requires more care.
First assuming $yequiv 0pmod16$ you have $y=16y_0$ and $$16y_0^2=y_0+1pmod32$$
Since $16y_0^2$ is even, $y_0+1$ is even, so $y_0$ is odd. When $y_0$ odd, $16y_0^2equiv 16pmod32$, so $y_0equiv 15pmod 32=$ and $yequiv 16cdot 15=240pmod512$.
Second, assume $y=16y_0+1$. Then $$16y_0^2 equiv 1-y_0pmod32$$ So $y_0$ is odd, $1-y_0equiv 16pmod 32$, or $y_0equiv 17pmod32$. So $yequiv 16cdot 17+1=273pmod512$
So the two solutions are $yequiv 240,273pmod512$.
Note that the sum of these two values is $1pmod512$, as befits the two roots of any quadratic equation of the form $x^2-x+C=0$.
Indeed, we have $(y-240)(y-273)equiv y^2-y-16pmod512$, so these are the only solutions, since only one of $y-240$ and $y-273$ can be even.
The first one is easy. You need $(x-8)(x+2)$ divisible by $512$. Both $x+8$ and $x-2$ are even, but only one of them can have higher powers of $2$ as factors. Thus, $xequiv 8pmod 256$ or $xequiv -2pmod256$.
The second requires more care.
First assuming $yequiv 0pmod16$ you have $y=16y_0$ and $$16y_0^2=y_0+1pmod32$$
Since $16y_0^2$ is even, $y_0+1$ is even, so $y_0$ is odd. When $y_0$ odd, $16y_0^2equiv 16pmod32$, so $y_0equiv 15pmod 32=$ and $yequiv 16cdot 15=240pmod512$.
Second, assume $y=16y_0+1$. Then $$16y_0^2 equiv 1-y_0pmod32$$ So $y_0$ is odd, $1-y_0equiv 16pmod 32$, or $y_0equiv 17pmod32$. So $yequiv 16cdot 17+1=273pmod512$
So the two solutions are $yequiv 240,273pmod512$.
Note that the sum of these two values is $1pmod512$, as befits the two roots of any quadratic equation of the form $x^2-x+C=0$.
Indeed, we have $(y-240)(y-273)equiv y^2-y-16pmod512$, so these are the only solutions, since only one of $y-240$ and $y-273$ can be even.
edited Dec 27 '14 at 4:26
answered Dec 27 '14 at 3:07
Thomas Andrews
128k10144285
128k10144285
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%2f1082002%2fquadratic-congruences-in-which-modulus-is-divisible-by-constant-term%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
The first is true exactly when $xequiv -2,8pmod 256$, since you just want $512mid(x+2)(x-8)$ and both of those terms must be even, but only one of them can have higher powers of $2$ as factors.
â Thomas Andrews
Dec 27 '14 at 3:12
@Thomas Ah, one of the terms is necessarily divisible by 256, and it's only achievable when it is equivalent to zero. Easy indeed. Thanks!
â Edacious
Dec 27 '14 at 3:23