#Help solving number theory equations

33 messages · Page 1 of 1 (latest)

grave dagger
#

So

lone folioBOT
#
  1. Wait patiently for a helper to come along.
  2. Once someone helps you, say thank you and close the thread with:
+close
  1. Feel free to nominate the person for helper of the week in #helper-nominations
  2. Do not ping the mods, unless someone is breaking the rules.
  3. If you're happy with the help you got here, and the server overall, you can contribute financially as well:
grave dagger
#

So we were seeing some system of equations of the form of

sullen sun
#

Diophantine equations

grave dagger
#

$x \equiv a \mod b\x \equiv c \mod d$

sterile hingeBOT
#

Miguel

sullen sun
#

maybe not

#

don't @ me, I'm busy

grave dagger
#

So if gcd(b, d) is not equal to 1, it may or may not have a solution

#

But if it has

#

Uhm let me think

#

What you do is to write $x = a + n_1 b$

sterile hingeBOT
#

Miguel

grave dagger
#

And then you put that in the second one

#

$n_1b \equiv c-a \mod d$

sterile hingeBOT
#

Miguel

grave dagger
#

So this has a solution if and only if uhm $\alpha*gcd(b, d) = (c-a)$

sterile hingeBOT
#

Miguel

grave dagger
#

And that solution is $\alpha*(c-a)b^{-1}$

sterile hingeBOT
#

Miguel

grave dagger
#

I think

#

So

#

$n_1 = \alpha * (c-a)b^{-1} + n_2d$

sterile hingeBOT
#

Miguel

grave dagger
#

And now we just put that back into the previous equation

#

$x = a + b( \alpha * (c-a)b^{-1} + n_2d)$

sterile hingeBOT
#

Miguel

grave dagger
#

Messed up somewhere 1s

#

Omg why am I so dumb

#

I'll do this with an example so that I don't mess up

#

And in another post

#

+close