I bet Euler or Gauss already thought of it and the solution is somewhere in a book full of such solutions.
I bet Euler or Gauss already thought of it and the solution is somewhere in a book full of such solutions.