added function to generate prime numbers and store them in .txt file