That's an interesting question. I actually had a lucid dream where a DC and I were playing a math game of some kind which involved adding/subtracting numbers. Although the DC in that dream was a sort of creepy, disembodied voice...

Regarding whether we could do math while lucid - again, I think the answer is yes. Although writing things in dreams can be unreliable. Sometimes it stays perfectly stable and consistent for me, but other times it might change or be difficult to focus on.

About a year ago, a member named nothin7 did a really interesting study on what people can do in lucid dreams. His hypothesis involved differences in brain hemisphere functioning. He even posted a PDF of the finished paper later in the thread. Good stuff, check it out:
Think you can do anything in a lucid dream? Participate in an empirical study!