It was easy to solve problem #58. Problem #28 left me a class which generates a sequence of number sitting on diagonals. What is left is to test how many of them are primes.

It is really interesting that that many primes sits on the diagonals – proportion drops pretty slow. I had to fix the class which generates a sequence of number sitting on diagonals so it returns Int64. Calculation takes ~ 8 seconds.

This problems is kind of a milestone – less then 10 thousand participants solved it.