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…
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).