Message Boards Message Boards

1
|
4251 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!!

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
POSTED BY: Mariusz Iwaniuk

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

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