Message Boards Message Boards

1
|
4263 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

I broke the record of prime number digits... discovered a prime number check code that gives {x} as a result when the number is prime...and when the number is not prime gives a list of results. .. when the number is too large...and it is not prime, as the list is too large, it does not work and sends a certain message saying that it is not possible to solve all the results...but when the expected result is {x } it doesn't send any message and doesn't send a result... so I put a number that I had gotten by another method and it ran running without sending any message...it was a 100000000 digit number that, according to my table, had to be prime...the problem is that for me to win the $100,000 prize I would have to have a certificate of a scientifically validated method...and this method doesn't work well for giant numbers that aren't Mersenne type, which are prime numbers of formula (2^n)-1

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

Solve and the like will use PrimeQ to determine primality, so there is no advantage over using PrimeQ directly. And that is a probabilistic method (with no known failures).

POSTED BY: Daniel Lichtblau

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

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

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

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

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

Group Abstract Group Abstract