I provided an answer on the Mathematics Stack Exchange that takes a programming approach to a mathematical problem (a la Project Euler).
Instinctively, I feel like my answer is "off topic" since the site exists for people studying mathematics, even though the site doesn't explicitly label CS as being off-topic. Nevertheless, the answer I provided is a valid solution for the stated problem.
Is it possible for an answer to be valid, but still considered "off-topic"? If so, is it acceptable to post the answer anyway?