Math


  • For generating prime number we can use this function :
20 = 2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20
         1  1  1  1  1  1  1  1   1    1    1    1    1    1    1    1    1    1    1
                                                                                           (memset)
                  0      0      0        0          0          0          0           0          0
                                                                 (x * 2; x=2 ,3- - - - - -10)
                           0          0                0                0                  0        
                                                                                               (x * 3)
                                   0                     0                      0                      0
So the prime number between 0 to 20 =2,3,5,7,11,13,17,19
  • Modulo Algorithm
System of determination of a big number (number may be hundred digit) :

157 % 11 = (15 % 11)7 % 11 = 47 % 11 (ACM-374 Use this technique)

Under construction......................