PROGRAM UJI KEPRIMAAN SECARA VISUAL (AXIOM 1)
| (HINT: PUT TOP LEFT CORNER AT N1) | PRIMALITY TEST PROGRAM (FOR LC x RC ===> LC) | ||||
|---|---|---|---|---|---|
| MOD(O3,2) | MOD(O3,3) | MOD(O3,5) | |||
| INPUT NUM-BER HERE ----> | 413 | 413 | 1 | 2 | 3 |
| IF Q3=0, NOOP! | IF R3=0, NOOP! | IF S3=0, NOOP! | |||
| nFL=(X+1)/6 ----> | =(O3+1)/6 | nFR=(X-1)/6 ----> | =(O3-1)/6 | ||
| nFL= | 69 | nFR= | 68.66666667 | ||
| A X I O M 1 | |||||
| LC x RC ==> LC | |||||
| Formula: n2 = ( nFL - n1)/P1 <== Viewed from LC. | |||||
| PF= | 413 | SQRT(O14)= | 20.322401 | ||
| nFL = | 69 | ||||
| Use the Table Below for Primality Test. | PRIMALITY TEST RESULT CORNER | ||||
| n | P1= | n2= | P2=6*n2+1 | If Cell O14 = "STOP!', | X (= PF) is from either |
| Maximum n | 6*n1-1 | (nFL-n1)/P1 | or | it means that test is | Group 5, Group 3 or |
| = PF/5/6 | (If n2 found | can also | stopped due to ===> | Grup even numbers. | |
| or | a round num- | = PF/P1 | |||
| 13.8 | ber, NOT a PN) | If Cell O15 = "STOP!', | X (=PF) is from RC | ||
| 1 | 5 | 13.60 | 82.60 | it means that test is | meanwhile this table |
| 2 | 11 | 6.09 | 37.55 | stopped due to ===> | is used for LC x RC. |
| 3 | 17 | 3.88 | 24.29 | ===> LC | |
| 4 | 23 | 2.83 | 17.96 | The rightmost table | If there is any round |
| 5 | 29 | 2.21 | 14.24 | column (P2=6*n2+1) | positive number in, |
| 6 | 35 | 1.80 | 11.80 | or PF/P1 is the real re- | X is a Derivative (or |
| 7 | 41 | 1.51 | 10.07 | sult of the test. ===> | Not a PN). Otherwise, |
| 8 | 47 | 1.30 | 8.79 | it is a PN. | |
| 9 | 53 | 1.13 | 7.79 | ||
| 10 | 59 | STOP! | 7.00 | ||
| 11 | 65 | 0.89 | 6.35 | NOTE: | |
| 12 | 71 | 0.80 | 5.82 | This Program is designed to write STOP! | |
| 13 | 77 | 0.73 | 5.36 | when the value of n2 is a round positive | |
| 14 | 83 | 0.66 | 4.98 | number. At this STOP Row it is seen that | |
| 15 | 89 | 0.61 | 4.64 | P2 is a round positive number, which | |
| 16 | 95 | 0.56 | 4.35 | means that the tested number X is a | |
| 17 | 101 | 0.51 | 4.09 | derivative (or not a Prime Number). | |
| 18 | 107 | 0.48 | 3.86 | If X is a Prime Number, there will be no | |
| 19 | 113 | 0.44 | 3.65 | STOP! Shown in any way. | |
| 20 | 119 | 0.41 | 3.47 | ||