try to write fast calculation of prime