Jump to content

Featured Replies

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

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.