Welcome to Prime Number Codes. We hope it will be useful in your enjoyment of prime research. If you aleady have a list of primes the codes may not be very useful, however codes are stored in one-third the hardware/software space as primes, and after one division step, codes take as much time to look up as primes. Learn about the codes anyway, its more fun, and easy as one, two, three!. 

Say you have a friend over and begin to discuss some heavy duty math projects, and you challenge each other to see how fast you can come up with the answer to the question: is 299209 a prime number, and assume that neither of you has a list of primes or a computer program to do it? Well, division by 30 will result in a quotient that contains a code to nail it quickly, say within 5 or 6 seconds, whereas it will take more than 100 division steps otherwise. Cool, huh?

 

 

 PRIMES AS  EASY AS ONE, TWO, THREE:

Step 1.  Divide the test number by 30.

Step 2.  The quotient identifies a row on the left of the decimal, the decimal identifies a code, as follows:

               Decimal    Code

                  .033         1

                  .233         2

                  .366         3

                  .433         4

                  .566         5

                  .633         6

                  .766         7

                  .966         8

Step 3.  Go to the Prime Code Tables, find the row and associated codes, if the code is there the test number is prime. For example, if the code is 1 (for decimal .033) and the codes for the row include the digit 1, the tested number is prime. Note that any decimal other than one of the eight shown above identifies a composite.

Use the above instruction steps to review the following examples using the Prime Codes table below.

 

Example 1. Test number 143; division gives 143/30 = 4.766, indicating row 4 code 7. In the table there is no 7 among the codes for row 4 (23568) thus 143 is composite.

Example 2. Test number 6269; division gives 6269/30 = 208.966, indicating row 208 and code 8. Go to column 200+ in the table and down to row 8 (200+8 = 208) and the acceptable codes (2578) include an 8, thus the test number 6269 is prime.

Example 3. Test number 7131; division gives 7131/30 = 237.700, for row 237 but .700 is not one of the eight acceptable decimals, and thus 7131 is composite.

 

 

                       Prime Codes for Row 0 to 250

          0+             50+            100+           150+           200+ 

 0      2345678    37              1367            24567         238

 1      1234578    14678        236              56               2457

 2      1234678    2367          12678          127             2468

 3      234567      235678      68                124             137

 4      23568        125            15                15678         1347

 5      124578      2456          456              12478         147

 6      13456        4568          12378          37               567

 7      145678      347            236              3467           1236

 8      13578        1246          3456            36               2578

 9      12347        2456          18                45678         1258

10     2345          137            124678        145             13578

11     125678      15              1458            1                 2478

12     24678        1234568    1348            1358           12468

13     2368          357            157              2567           2

14     134678      348            48                3457           128

15     23458        178            23456          12567         167

16     23678        24567        36                24678         13

17     34              12568        125678        1348           36

18     12578        478            1256            36               23478

 19    12578        34568        1347            2358           1238

20     12456        348            2457            1246           26

21     134578      12347        1248            57               278

22     1457          16              345              2368           1468

23     1368          457            12368          26               13468

24     2467          1567          246              2345           45

25     12367        1567          3568            378             348

26     258            12458        457              1578           1347

27     13468        178            347              47               4567  

28     4567          1235          2347            23               1578

29     2345          1234678    236              3578           148

30     2368          357            235678        2456           235

31     2357          2358          145              12346         68

32     2357          245            28                3567           12357

33     12678        4                34578          3458           12378

34     13468        13678        128              123             267

35     1346          128            1278            2467           268

36     234578      347            346              13               78

37     246            237            15678          48               356

38     347            2567          456              1234568     36

39     1357          1245678    2                  467             257

40     14578        23468        13568          135             23468

41     1268          1367          13478          2346           2457

42     5678          258            13478          67               7

43     123458      12346        2                  1357           256

44     12              457            2568            12678         1348

45     357            1238          247              123568       16

46     168            2578          358              157             4

47     45678        258            34                458             127

48     2346          4578          12357          4                 356

49     1345678    18              347              35               23568

50     37              1367          24567          238             2578

        

 

    

 

The above codes cover primes through 10K and codes are now available for primes through 1M in booklet form or floppy for use in the classroom or light industry. Email us at ki@kispy.net (use the word "codes" in the subject) for an update, more info, or request copies as work continues to get codes through 10M as well as a computer program to facilitate the process. Unfortunately, primes above 100M will not work well because of rounding.

On a personal note, I have been in and out of primes for over 50 years, and got an eye-opener these last three after finally getting together with a few others on the internet. (G.L.Honaker with Prime Curios has been a great coach.) My pursuit was to find a method of testing numbers for primality with only one division step, which was finally achieved these last few months after looking over some of my old notes. I need help to computerize the entire process, so interested readers are welcome to offer assistance.

                                                               Ki the Spy

An alternate method to find the codes is by SOD (sum of digits.)

Step 1. If SOD evenly divides by 3, the number is composite.

Step 2. For test numbers that end in:

           1, if (SOD -1)/3 is integer, the code is 1, otherwise 3.

           3, if (SOD-1)/3 is integer, the code is 4, otherwise 7.

           7, if (SOD-1)/3 is integer, the code is 2, otherwise 5.

           9, if (SOD-1)/3 is integer, the code is 6, otherwise 8.