Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2014-08-12 05:33:35

burgess
Member
Registered: 2014-06-26
Posts: 49
Website

How to find whether a given number is prime or not?

What is a prime number

A number is greater than 1 is called a prime number, if it has only two factors, namely 1 and the number itself.

Prime numbers up to 100 are: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

Procedure to find out the prime number

Suppose A is given number.

Step 1: Find a whole number nearly greater than the square root of A. K > square root(A)
Step 2: Test whether A is divisible by any prime number less than  K. If yes A is not a prime number. If not, A is prime  number.

Example:

Find out whether 337 is a prime number or not?

Step 1: 19 > square root (337)
Prime numbers less than 19 are 2, 3, 5, 7, 11, 13, 17
Step 2: 337 is not divisible by any of them

Therefore 337 is a prime number

These are simple and easy tricks which are helpful to solve your math homework problems  .

Offline

#2 2014-08-12 06:43:00

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,838
Website

Re: How to find whether a given number is prime or not?

Step 2: Test whether A is divisible by any prime number less than  K. If yes A is not a prime number. If not, A is prime  number.

What happens if A is divisible by K?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#3 2014-08-12 09:33:27

Olinguito
Member
Registered: 2014-08-12
Posts: 649

Re: How to find whether a given number is prime or not?

We don’t actually need K. We just have to test whether A is divisible by any prime less than √A.


Bassaricyon neblina

Offline

#4 2014-08-14 03:38:30

Primenumbers
Member
Registered: 2013-01-22
Posts: 131

Re: How to find whether a given number is prime or not?

x! - 2^y = Primes when divided by 2 until odd, and is < x squared.

because a no. divisible by 7 minus a no. that isn't, always = a no. NOT divisible by 7           this will work for any no. because the remainder remains when you minus from the no. which has a remainder of zero.

Last edited by Primenumbers (2014-08-14 20:07:04)


"Time not important. Only life important." - The Fifth Element 1997

Offline

Board footer

Powered by FluxBB