4 ms·
It took me embarrassingly long to notice that Last[IntegerDigits[x,base]] is just Mod[x,base] (which ought to be faster). I guess the author wanted to avoid di
by Steuard 11y ago
It took me embarrassingly long to notice that Last[IntegerDigits[x,base]] is just Mod[x,base] (which ought to be faster).
I guess the author wanted to avoid discussing modular arithmetic in an article for general audiences?