code: public Rational at(int n) {
          if (n == 1) {
              return (new Rational(-1, 2));
          } else if (n % 2 != 0) {
              return Rational.ZERO;
          } else {
              final int nindx = n / 2;
              if (a.size() <= nindx) {
                  for (int i = 2 * a.size(); i <= n; i += 2) {
                      set(i, doubleSum(i));
                  }
              }
              return a.get(nindx);
          }
      }
docs: The Bernoulli number at the index provided.
  
  @param n the index, non-negative.
  @return the B_0=1 for n=0, B_1=-1/2 for n=1, B_2=1/6 for n=2 etc