Jump to content

Recommended Posts

Posted (edited)

Hi Everyone, could anyone here help me comfirm that this calculation verifies prime numbers?
This is the calculation:

DSum(Mod((x^2−A),(2B−2x))==0,x,0.0,(B−2))


A is a reminder of a number to be tested while B is a factor of a top closest square that is used to subtract the test number. For example,


If you want to test 7, the top closest square is 3^2 or 9. B is 3 as it is a factor of 3^2. By using the square to subtract the test number, 
3^2- 7=2, u get 2. Plug into the formula, u get


DSum(Mod((x^2−2),(3⋅2−2x))==0,x,0.0,1.0)


If you want to test 19, the top closest square is 5^2 or 25. B is 5 as it is a factor of 5^2. By using the square to subtract the test number, 
5^2- 19=6, u get 6. Plug into the formula, u get


DSum(Mod((x^2−6),(5⋅2−2x))==0,x,0.0,3.0)


It works for any prime number(big or small). If u do it rite u should get all false.


Tq...

Edited by Lan Todak

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.