On Jun 17, 1:24 ¨Âí¬ Æô³ë¼æôæ®®®Àçíáéì®ãïí¾ ÷òïôåº
> Sandor Szs wrote:
> > According to the page you posted your condition is not correct.
> > I don't read it carefully nor I tested it but it's obvious that
> > you forget to calculate the -1 mod n
>
> Thanks it seems to be working now, sometimes you just miss the obvious.
> --
> Posted viahttp://www.ruby-forum.com/.

Also see Ruby code here:

http://snippets.dzone.com/posts/show/4636