# How to determine a multiplier that, when repeatedly applied to 1, will reach a target value of X in a specific number of multiplications?

I have some java code that is taking a set of non-unique integer values and plotting them on a histogram, with the X-scale being the value of the integer and the Y-scale being the frequency with which it occurs in the set.

For simplicity in using the histogram for comparisons at a later stage, the values are grouped into ranges. I would like the be able to control the number of different ranges used to represent all the values in the set(which is also the number of columns in the resultant graph), and currently I am using 40 different ranges.

The maximum value of a possible integer in the set is around 1500, however lower value integers between 0-50 are much more frequent. For this reason, generating the ranges by simply dividing the maximum value by 40 results in a set of ranges where the lowest range, 0-37.5, contains nearly all the values, and creates a very lopsided histogram.

For this reason, I would like the able to generate a non-linear set of ranges roughly like {0 -> 1, 1 -> 2, 2 -> 4, ... , 1375 -> 1500} containing precisely the number of ranges that is required (in the current example being 40 different ranges)

I apologise if I have over-complicated the problem, this was the best way I could think to explain what I need. Thanks very much for any help you can provide.

$t (> 0)$ your target, n number $(> 0)$ of steps and x your multiplier then $x=\sqrt[n]{t}$. This is the geometric progression. If that is the best way to solve your display problem is a different question.