TRENDING NEWS

POPULAR NEWS

There Is A General Rule For Determining Whether A Number Is Prime

Is there any general divisiblity test rule for prime numbers?

I'm assuming you're asking about an algorithm for determining whether a number is divisible by an arbitrary prime number based on the digits of the number that doesn't require one to divide by the number in question. Yes, there is a way to construct such a rule for any number. There are two explanations (one my own) here:http://everything2.com/title/Gen...

Develop a general rule for f^(n)(x) given f(x). f(x) = 1/x?

f'(x) = -1/x^2
f''(x) = 2/x^3
f'''(x) = -3*2/x^4
...
f^(n)(x) = (-1)^n n!/x^(n+1)

How does one determine whether a number is evenly divisible by 9?

Division can be easy if your multiplication concepts are clear. If you have the tables on the tip of your tongue, you have already won half the battle. Besides, knowing what are the prime or composite numbers, integers, rational numbers, etc. also help you grasp the divisibility rules much easily. So, with the divisibility rules you will be able to find if a number can be divided evenly, without a remainder.But, for each number there is a specific divisibility rule, and some are simple to use compared to others. I found this great math blog that explains the rules with examples - https://logicroots.com/MathBlog/... (a MUST read to understand divisibility rules).So, how do you determine if a number is divisible by 9? One of the quick shortcuts is to add up the digits in the number and find out if the output is divisible by 9. If it is divisible then the actual number can be divided by 9 too. For instance, you can check if 4,518 is divisible by 9. Let’s add up the numbers – 4 + 5 +1 + 8 = 18. 18/9 = 2. Therefore, since 18 is divisible by 9 and the remainder is 0, the entire number is divisible too.Another example can be the number 6,993 that is divisible by 9. How?6 + 9 + 9 +3 = 2727/9 = 3So, 6, 993 is divisible by 9.Do check the blog for more details. Hope I helped.

What is the formula of prime numbers?

Prime numbers are a big deal in cryptography and network security. Without prime numbers all are data traffic would be unencrypted.There is one “FOOLPROOF” method called the FERMAT’S PRIMALITY TEST to check a number is prime or not...The gist of the FERMAT’S PRIMALITY TEST is:“If there’s a number ‘n’ you want to check for primality, then it should satisfy the following congruency condition:If n is a prime number:It should pass all the congruency tests between 1 to n - 1, if it fails the test between any number in the range 1 to n - 1 then the number n is not a prime number.....Let me illustrate an example to make myself more clearer,For example consider you want to check whether 7 is prime or not, then applying Fermat’s primality test.Since it passes all the tests between 1 to 6(n - 1), Hence we can say that 7 is a prime number.....Here’s a C++ program to illustrate the following concept:#include
#include
using namespace std;

int FermatPrimalityTest(int num)
{
long long int res;
int flag = 0;

for(int a = 2; a < num; a++)
{
res = (long long int)pow(a, num) - a;

if(res % num == 0)
{
flag = 1;
}

else {
flag = 0;
}
}

return(flag);
}

int main()
{
long long int num;

cout << "\nEnter a number: ";
cin >> num;

bool flag = FermatPrimalityTest(num);

if(flag == 1)
cout << num << " is a prime number" << endl;

else cout << num << " is not a prime number, its a composite number" << endl;

return 0;
}
Hope this helps :)

Suppose that p is a prime number. (a) Using the definition of congruence, prove x^2-=y^2 (mod p) if and?

Ahh... It has been so long since number theory class. Alas, I'm sorry I can't help you with all of your questions as I have forgotten a good deal, but:

(c) Disprove the statement “If x4-=y4 (mod p), then x-=±y (mod p)”.

One really easy way to disprove this is to find some x, y, and p such that x is not congruent to plus or minus y (mod p). If we simply let p = 4:

x4-=y4 (mod p)
x4-=y4 (mod 4)
x(0)-=y(0) (mod 4)
0 -= 0 (mod 4)

We see if p=4, it does not matter what x and y are, thus we can find some x such that it is not plus or minus y which will satisfy the statement. (Take x=2, y=1 for example)

The actual rule for this is (one of the few things I remember from number theory) is that you find the GCD of each part (ie, x4 and y4 and mod p) and then you divide each by the GCD. You DO NOT divide solely each side by the GCD, but additionally you divide the modulus by the GCD. So, in the case of p = 4:

x4-=y4 (mod 4)

becomes

x-=y (mod 1)

Which is true, stating that given any x and y, the statement is true.


Alas, sorry I don't recall enough number theory to help with the others, but I hope this helps somewhat. Best Wishes.

Is there any formula to find prime numbers between any two given numbers?

NO!there isn't any formulas available to find a prime no. between any given intervals!But,every prime no.(except 2)can be written of the form 4k±1!so,let there be a inteval [a,b]then list all the no.s that can be written in this form!i.e start with 4*[a/4]+1,then 4*[a/4+1]±1 and so on!Then,you have to discard some no.s as there are no ways find the next prime no.!but all the no.s will belong in your list!cheers!

How can one test if a large number is prime?

This is a very difficult computational task. It's known as integer factorization. The fact that it's a very hard thing to do and takes a lot of time, is why it is used in RSA cipher, one of the most commonly used Public-key cryptography on the internet.One of the popular algorithms to do integer factorization is Fermat's factorization method.Let's read about it on Wikipedia:Fermat's factorization method, named after Pierre de Fermat, is based on the representation of an odd integer as the difference of two squares:That difference is algebraically factorable as ; if neither factor equals one, it is a proper factorization of N.Each odd number has such a representation. Indeed, if is a factorization of N, thenSince N is odd, then c and d are also odd, so those halves are integers. (A multiple of four is also a difference of squares: let c and d be even.)In its simplest form, Fermat's method might be even slower than trial division (worst case). Nonetheless, the combination of trial division and Fermat's is more effective than either.Have a look here for an algorithm example on Wikipedia.Bests.

What's the best algorithm to check if a number is prime?

The answer really depends on a lot of factors.First of all, the size. For small numbers, the division test works pretty well. Check for all numbers up to [math]\sqrt n[/math] for division. If a lot of such numbers need to be tested for primality, some sieving algorithm can be used to find the primality of the entire range.For large [math]n[/math], this method starts being too slow. So we need to look for something better. Here, we need to make an important decision. What do we mean by checking whether a number is prime? Will an answer which is correct with an extremely high probablility do? This is because the probabilistic algorithms for checking primality are much faster than the deterministic ones. A good, fast example of a probabilistic algorithm is Miller–Rabin primality test, which gives an answer with only a [math]4^{-k}[/math] probability of being wrong when [math]k[/math] potential compositeness witnesses are used. Such algorithms are enough for real life applications.Now if you really really need a deterministic algorithm, go for Elliptic curve primality proving or AKS primality test. They are way slower than the probabilistic algorithms, but still polynomial time and hence faster than all the brute force methods.Also, if you know that your number has some special form, there are specialised algorithms which are faster. These are Lucas–Lehmer primality test (for Mersenne numbers : numbers of the form [math]2^{p}-1[/math]), Lucas–Lehmer–Riesel test (for numbers of the form [math]k 2^{n}-1[/math]), Pépin's test (for Fermat numbers : numbers of the form [math]2^{2^n} + 1[/math]).

What are some shortcuts to finding a prime number?

There are as such no shortcuts to find prime numbers but still these 2 points may help a lot..1- All prime numbers greater than 5 must be of the form 6n+1 or 6n-1.. but most important is that a number of such forms may or may not be a prime number.. i.e 35 = (6*6–1) is not a prime number but for 33 = 6*5+3 we can be sure that it is not a prime number2- The sum of the digits of those number can never be 3 or 9 or their multiples..

TRENDING NEWS