code: public static int[] generateExpSequence(int start, int end, int steps)
      {
          // Check that there are at least two steps.
          if (steps < 2)
          {
              throw new IllegalArgumentException("There must be at least 2 steps.");
          }
  
          List<Integer> result = new ArrayList<Integer>();
  
          // Calculate the sequence using floating point, then round into the results.
          double fStart = start;
          double fEnd = end;
  
          // float fCurrent = start;
          double diff = fEnd - fStart;
          double factor = java.lang.Math.pow(diff, (1.0f / (steps - 1)));
  
          for (int i = 0; i < steps; i++)
          {
              // This is a cheat to get the end exactly on and lose the accumulated rounding error.
              if (i == (steps - 1))
              {
                  result.add(end);
              }
              else
              {
                  roundAndAdd(result, fStart - 1.0f + java.lang.Math.pow(factor, i));
              }
          }
  
          // Return the results after converting to a primitive array.
          return intListToPrimitiveArray(result);
      }
docs: Given a start and end and a number of steps this method generates a sequence of expontentially spaced integer
  values, starting at the start (inclusive) and finishing at the end (inclusive) with the specified number of
  values in the sequence. An exponentially spaced sequence is one where the ratio between any two consecutive
  numbers in the sequence remains constant. The sequence returned may contain less than the specified number where
  the difference between two consecutive values is too small (this is more likely at the start of the sequence,
  where the values are closer together).
  
  <p/>As the results are integers, they will not be perfectly exponentially spaced but a best-fit.
  
  @param  start The sequence start.
  @param  end   The sequence end.
  @param  steps The number of steps.
  
  @return The sequence.