calculate prime number by js and php