i2i Systems interview question

algorithm of finding prime number