vendredi 27 février 2015

Repeating Cycle of Modulus


Is there a efficient method to find the value of 1111..nmod M?

One can always use repeated squaring to find

100mod M + 101mod M + 102mod M + 103mod M + ...10nmod M

Is there any faster method than this?




Aucun commentaire:

Enregistrer un commentaire