#AHK, 63 bytes
AHK, 63 bytes
a=%1%
b=%2%
a+=1
While b>0
{s:=Mod(b,a) " "s
b:=b//a
}
Send,%s%
AutoHotkey assigns numbers 1-n as variable names for the incoming parameters. It causes some problems when you try to use those in functions because it thinks you mean the literal number 1 instead of the variable named 1. The best workaround I can find is to assign them to different variables.