Group Abstract Group Abstract

Message Boards Message Boards

1
|
4.8K Views
|
7 Replies
|
8 Total Likes
View groups...
Share
Share this post:

Is there a limit of value for option Modulus?

Vary the value of n and observe that it only gives a result for x if n is not a prime number. An easy prime number checker...but it only works up until a certain value due to the limit of modulus function... Is there a way to use modulus without any number limit? When it is not a prime number it gives a list or single number...

n=17393
eq1=n/(n-x)==n;
a={x}/.Solve[{eq1},{x},Modulus->n]
a+n
7 Replies

Thank you so much Professor Daniel Lichtblau and the engineer Mariusz Iwaniuk!!!! God bless you!!

Further to the nice hint provided by Mariusz Iwaniuk:

n = 17393;
eq1 = n/(n - x) == n;
Solve[{eq1}, {x}, Modulus -> n]

Out[568]= {{}}

Upshot: Any element in the prime field Z_17393 is a solution.

POSTED BY: Daniel Lichtblau

From Help pages: enter image description here

You can see: "{{}}" no solution.

Table[Solve[n/(n - x) == n, x, Modulus -> n], {n, 2, 
   20}] // MatrixForm
POSTED BY: Mariusz Iwaniuk

Can you just tell me what id the meaning of the answer {{x}} when i choose a prime number in the equation:

n=17393
eq1=n/(n-x)==n;
a={x}/.Solve[{eq1},{x},Modulus->n]
a+n
POSTED BY: Daniel Lichtblau

Maybe this helps.An example:

  n = 20;
  Solve[x^10 + 2 x^3 - 20 == 0, x, Modulus -> n]
  Solve[Mod[x^10 + 2 x^3 - 20, n] == 0 && 
    0 < x < n, x, Integers](*x=0  only missing*)
  Reduce[Mod[x^10 + 2 x^3 - 20, n] == 0 && 
    0 < x < n, x, Integers](*x=0 only missing*)

And:

    Table[Solve[x^10 + 2 x^3 - 20 == 0, x, Modulus -> n], {n, 2, 
       20}] // MatrixForm

If n=8 and n=16 is no solution.

And then yours equation:

   ClearAll["`*"];
   Solve[Mod[n/(n - x) - n, n] == 0 && 0 < x < n, x, Integers]
   Reduce[Mod[n/(n - x) - n, n] == 0 && 0 < x < n, x, Integers]

Mathematica gives only general solution, but it dosen't know under which C1 is no solution.

Regards M.I.

POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard