Quantcast

A community for students. Sign up today!

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

shahzadjalbani

  • 2 years ago

Is there any equation to calculate the prime numbers?

  • This Question is Closed
  1. nbouscal
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Nope

  2. lgbasallote
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    do you mean a formula to verify if it is prime?

  3. shahzadjalbani
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Yes.....

  4. nbouscal
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    There are a lot of methods for finding prime numbers, but it's not that easy, there's no function to check if any number is prime without having a list of prime numbers to use

  5. nbouscal
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Sieve of Eratosthenes is a good place to start if you want to research this area

  6. lgbasallote
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    i can come up with a formula impromptu....o.O

  7. lgbasallote
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    but yeah...there isnt any im familiar of

  8. ParthKohli
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Easiest way: check if it's divisible by any natural number or not :P

  9. nbouscal
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Trust me the number theorists would love if there was an easy formula to verify primality :P

  10. nbouscal
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    So far, there isn't. If there was the Reimann Hypothesis wouldn't be as big of a deal as it is.

  11. ParthKohli
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I see something interesting. http://en.wikipedia.org/wiki/Lucas%E2%80%93Lehmer_primality_test

  12. lgbasallote
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    here is a list of *some* prime numbers if itll help: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997

  13. nbouscal
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Yeah parth that is for Mersenne primes only, though

  14. ParthKohli
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    ^ spam. It didnt help

  15. lgbasallote
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    are you good now @shahzadjalbani ?

  16. shahzadjalbani
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    @lgbasallote You sent a list of numbers now I have to compare each number with this list it will more difficult and lengthy job . Is there any simple way to do it .

  17. nbouscal
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    There is not a simple way with the primes. The primes are not simple. That's why people are still studying them :)

  18. lgbasallote
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    my way is bloodily and manually divide a number by the simplest prime numbers (2, 3, 5, 7, 11) if i get a quotient with no remainder it is not prime....if there is a remainder...i have no way f knowing so i give up and say true lol

  19. lgbasallote
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    i have no way of knowing because the number could be divisible by the succeeding prime numbers or it could be just prime

  20. nbouscal
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    One important method when determining if a number is prime is to bound the potential divisors by the square root of the number you're investigating. Once you hit that bound, you know it's prime.

  21. lgbasallote
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    but normally...if the number is not divisible by the basic prime numbers then it is prime...teachers are not that sadistic to have you try each one

  22. shahzadjalbani
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    @nbouscal explain your statement.

  23. nbouscal
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Well, any integer divisors come in pairs, right? So if you're looking at the number 20, for example, you have pairs 1,20; 2, 10; 4, 5... then you have 5,4; 10,2; 20,1... but you already had those, just backwards. So if you're checking primes, and you check 1, 2, 4... you don't need to check any more numbers past that because you already would have found it in those first pairs. Once you hit the square root of the number, you know you don't have to check anymore.

  24. lgbasallote
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    or just divide by the primes

  25. nbouscal
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    So for example you want to check if 51 is prime, and you know that sqrt(51) is just a bit over 7, you only have to check if 51 is divisible by 2, 3, 5, 7. You don't need to go any further than that.

  26. lgbasallote
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    20/2 wields a quotient with no remainder so it is automatically not prime

  27. nbouscal
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Obviously 20 isn't prime, lgba, that was not the point of the example.

  28. lgbasallote
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    i was giving an eample too...of my method

  29. nbouscal
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    The point was to show why you don't need to worry about primes greater than the square root, because you would already have run into them before you got to the square root.

  30. lgbasallote
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    makes sense...

  31. nbouscal
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    The square root bound is very useful when you are using computer methods to check primality on large numbers, it saves a lot of time.

  32. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Ask a Question
Find more explanations on OpenStudy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.