If a number n can be written as axb and m=sqrt(n). Here n=m*m. We say we only need to check upto m because min(a,b)<=m. So cant we take cube roots? Suppose we take n=21, then n=1x3x7. But Cube root is 2. Why does this method fail?
Why do we only check up to the square root of a prime number to determine if it is prime? Can't we use cube root?
485 Views Asked by Abhishek Agrawal At
1
There are 1 best solutions below
Related Questions in PRIMES
- find prime numbers in python
- SPOJ PRIME1 Prime Generator: Wrong Answer?
- Freezing goal in prolog
- Store the outcome of an algorithm that looks for prime numbers in a file (C#)
- Generating primes of given length in python
- Implementing a prime number counter
- "Prime or not" program
- Project Euler #10 How to pre-calculate sum of primes?
- Highly Factorized Sieve of Eratosthenes
- Problems with prime number generator, using ArrayList
- JavaScript Prime Number
- Count prime number till N
- How to make the Sieve of Eratosthenes faster?
- Get prime factors of a given number using Java
- Primes and boolean logic
Related Questions in SQUARE-ROOT
- Performance Improvement For Using BigInteger While Calculating Square Root
- Nth root of BigInteger
- How is the logic reasoning done in these three codes?
- Quake inverse-square root: accuracy
- Why do we only check up to the square root of a prime number to determine if it is prime? Can't we use cube root?
- Fitting Data to a Square-root or Logarithmic Function
- Arrays.asList issue when computing square root of integer array elements
- Incorrect output when computing square root with Nasm x86 Assembly
- Why is my call of the CUDA math library sqrt() function failing?
- self checking test bench for square root algorithm
- grouping of bits in square root division
- Truncation error in taking square root in python
- OverflowError: long int too large to convert to float
- Type-preserving (complex, real) square root in R?
- Shortest way to check perfect Square?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Consider n = 143 = 11 * 13. The cube root of 143 is between 5 and 6. If you only test divisibility by the primes up to 6, you will not find either of the two factors of n and will mistakenly conclude that 143 is prime.