Math Is Fun Forum

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

You are not logged in.

#1 2017-01-14 22:08:44

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

An easy way to find out if a number is prime.

p=Any number
A=2x3x5x7x11x13x17........ up to


m=Any multiple

A-pm= A number factorable by a factor of p

if p has one.

To get A-pm, go through the primes, subtracting p as many times as you like.

Example:
p=129

Rd. Dwn. to nrst. prime=11
A=2x3x5x7x11
2x3x5x7=210 210-129=81
81x11=891 891-(129x6)=117
A-129m=117
117 will have a factor the same as p if it has any.
117/129=39/43 129 is NOT prime (Common denominator =3)

In this way we can find out if p is composite without ever having to use a number

. Might be useful for computers.


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

Offline

Board footer

Powered by FluxBB