No.14239456 ViewReplyOriginalReport
My psychic friend who is called Zemblini just taught me a handy trick for testing the primality of numbers. And I want to ask you if it is a valid prime test or not.

The prime test relies only on arithmetic division and easy addition/subtraction.

Consider three variables: n, A, and B.

n is the number being questioned as for whether or not it is prime. A begins with the value n-2. And B begins with the value 2, and then it rises.

Now perform the following procedure:

Divide A/B. If A does not divide B cleanly, that is, with no remainder, then increase B by one and decrease A by one, and repeat until A and B become close to each other in value. If A never cleanly divides B, then n is prime.

Example: The number 341 is not prime. Define n as 341.

So A begins at 339 (that is n-2) and B begins at 2.

339/2 = 169.5 not an even division.

338/3 = not clean.

337/4 = not clean.

Etc.

This continues until 330/11 which is 33. And 11 is a factor of 341 also. It only takes 10 divisions with known numbers to find that 341 is composite using this method.

For a prime number, A will never divide evenly into B. Take n = 13. We have: 11/2... 10/3... 9/4... 8/5... 7/6...

But for 9 we get: 7/2... 6/3... In only two divisions we find that 9 is composite and 3 is a factor of 9.

I am just wondering can anybody disprove this or is it a valid test? Thank you. Appreciated.