Add method Rational.getRepeatString(n, d).