Solving prime-number problem in 2 ways.