Add prime algorithm and prime calculation

add prime check algorithm
add prime calculation algorithm
add primitive test