I came across other tex questions where people asked ways to represent numbers in comma-separated format. That is writing 1234567 as 1,234,567. I need this while teaching addition/subtraction to my child. I am trying to generate randomized list of addition problems which gets harder by day. I basically want to run the code and generate say 30-days worth of daily problem sets which gets harder as we go. While I can tweak it for my own child on the go, there are other children involved and they will not have the chance of accessing me. So, it is on the parents. Long story short, here is the challenge I do have:
The previously given solutions to this problem have two issues:
Many do not work well enough in math mode!
(and this is my main issue) I would like to do something like this (using numprint package as a failing example):
$\numprint{\sage{12454785*34}}$
As you can guess, this does not work as \numprint reads a string and it does not bode well with \sage{...} within! I thought of defining my own sage function and then using \sagestr{} but it provides a temporary solution as I will later use the same set of files to generate some online content which does NOT bode well with \sagestr (another story!).

