# How to compute antilogarithmic and superlogarithmic spaced values?

Let's suppose I have a range, e.g. $[100, 900]$. I want to compute 8 logarithmic spaced values $x_i={100, ..., 900}$. I use the following formula:

$$x_1=\log(S)+\frac{(i-1)\log(S/L)}{n-1}$$

In the formula, $S$ is the lower extreme of the range (here $S=100$); $L$ is the higher extreme of the range (hese $L=900$); $n$ is the number of spaced values (here $n=8$); $i$ is the $i^{th}$ spaced values.

So in my example, the $5^{th}$ values is $x_5=350.9$, while the $6^{th}$ value is $x_6=480.4$.

How to compute antilogarithmic and superlogarithmic spaced values, in the same range, with the same $n=8$?

The solution can be found in this article (table 1), which uses these scales to compute spaced stimulis used in their experiment.

First of all, I'll point out that I think your formula should be:

$$\log(x_i) = \log(S)+\frac{(i-1)\log(L/S)}{n-1}$$

(in which I have changed "$x_1$" on the left to "$log(x_i)$", and inverted the ratio "$S/L$" to "$L/S$" so that the numbers grow from $S$ to $L$ rather than shrinking from $S$ to $S^2/L$.)

The term "superlogarithmic" can mean lots of things, ranging from a precise closed-form mathematical formula to a broad category-label for anything "beyond logarithmic". The paper you linked to is not particularly clear about what their closed-form expressions are, merely stating:

The topmost distribution contains negatively skewed stimuli, the second illustrates arithmetically spaced stimuli, the third illustrates logarithmically spaced stimuli, and the fourth illustrates more positively skewed stimuli. We refer to the first distribution as antilogarithmic spacing because the distribution is as negatively skewed relative to arithmetic spacing as a logarithmic distribution is positively skewed. The most positively skewed distribution is dubbed superlogarithmic distribution because it is as positively skewed relative to a logarithmic distribution as an arithmetic distribution is negatively skewed.

However the table you refer to gives some three-digit numbers, ranging from 100 to 900 with six more intermediate values just as you suggest in your question. (There is a second set of example values ranging from 333 to 666). I'll reproduce the 100-to-900 part of the table here:

  Antilogarithmic   Arithmetic      Logarithmic   Superlogarithmic
Large Ratio
100              100             100             100
343              214             137             114
520              329             187             134
649              443             256             162
744              557             351             203
813              672             480             274
863              786             658             420
900              900             900             900


In the "arithmetic" row, of course, the first differences are roughly $800/7 = 114.286...$. We can express these numbers in a closed form, similar to the (as-corrected) formula you gave but just removing "log" from three places and changing an $L$/$S$ to $L$-$S$:

$$x_i = S+\frac{(i-1)(L-S)}{n-1}$$

The "logarithmic" values are increasing in a way more commonly called "geometric" or "exponential" growth. As you suggest with your formula we can take logarithms of the numbers, then take the first differences of those, and get the same value each time. I'll use logarithm to base $e$:

                         first
value   ln(value)   differences
100      4.605
0.3148
137      4.920
0.3111
187      5.231
0.3141
256      5.545
0.3156
351      5.861
0.3130
480      6.174
0.3154
658      6.489
0.3132
900      6.802


Let's take care of the "antilogarithmic" numbers now. I looked at the last two (863 and 900) and noticed the difference is 37, which is the same as the difference between the first two "logarithmic" numbers (100 and 137). So let's try adding pairs like this:

  Antilogarithmic  Logarithmic      Sum (antilog.
(reverse order)                  + logarithmic)
900             100        900 + 100 = 1000
863             137        863 + 137 = 1000
813             187        813 + 187 = 1000
744             256        744 + 256 = 1000
649             351        649 + 351 = 1000
520             480        520 + 480 = 1000
343             658        343 + 658 = 1001
100             900        100 + 900 = 1000


If we use $Antilog(n+1-i)$ and $Log(i)$ to refer to the two sequences of numbers that add up to 1000, then the relationship between them is

$$Antilog(n+1-i) + Log(i) = S + L$$

noting that the $i$ index is reversed for the Antilog sequence. So the formula they used for the "antilogarithmic" sequence is simply:

$$\log(S+L-x_{(n+1-i)}) = \log(S)+\frac{(i-1)\log(L/S)}{n-1}$$

With the "superlogarithmic" numbers we might do the first-differences-of-logarithms approach, and find that the logarithms have something like an $x^2$-type increasing pattern, or the logarithms might themselves be increasing "geometrically". So we could take differences and ratios:

                         first        successive
value   ln(value)   differences       ratios
100      4.6052
0.1310        1.0285
114      4.7362
0.1616        1.0341
134      4.8978
0.1898        1.0387
162      5.0876
0.2256        1.0443
203      5.3132
0.2999        1.0564
274      5.6131
0.4271        1.0761
420      6.0403
0.7621        1.1262
900      6.8024


Unfortunately, the first differences do not seem to be growing in a linear, quadratic, or geometric way, nor do the successive ratios.

Let's use another popular heuristic: look at the numbers (100, 114, 134, ...) and ask "How long does it take for it to double?". You can see that it takes 4 steps to go from 100 to 203, then 2 steps to go to 420, then just 1 step to get to 900. So the time it takes to double is half as long each time. That does seem "superlogarithmic", doesn't it? The values grow exponentially, and the time taken for each exponential step shrinks exponentially.

But actually there is nothing exponential or logarithmic about this sequence. It is a very common type of sequence, appearing all over the place in math and science and engineering. It was described at least as far back in history as polynomial and geometric growth rates. The simplest example of this type of growth is seen in the sequence:

$$\frac{1}{8}, \frac{1}{7}, \frac{1}{6}, \frac{1}{5}, \frac{1}{4}, \frac{1}{3}, \frac{1}{2}, \frac{1}{1}$$

It takes 4 steps to double from 1/8 to 1/4, then 2 steps to double again to 1/2, and just 1 step to double to 1. This is called a harmonic progression. A harmonic progression is just a sequence of values whose reciprocals are in arithmetic progression. (It is called "harmonic" because of its relationship to music, particularly an overtone sequence. Overtones are the notes that can be played on a trumpet with all valves open: all wavelengths of the notes you can play are 1/N times the fundamental wavelength which is the wavelength of the instrument's lowest note.)

Now we have a strong lead for a possible explanation for the "superlogarithmic" numbers. If we take the reciprocals, then the first differences, we should get roughly a constant:

                              first
value     1/value        differences
100      0.01000
-0.001228
114      0.00877
-0.001309
134      0.00746
-0.001290
162      0.00617
-0.001247
203      0.00493
-0.001276
274      0.00365
-0.001269
420      0.00238
-0.001270
900      0.00111


The first differences of reciprocals look pretty close to being constant, so let's make a harmonic form of the above closed-form expressions:

$$\frac{1}{x_i} = \frac{1}{S}+\frac{(i-1)(\frac{1}{L}-\frac{1}{S})}{n-1}$$

and use it on the known $S$ and $L$ values. We get:

              "superlogarithmic" (reciprocal arithmetic)
(with S=100,L=900)            (with S=333,L=666)
i      in paper     our formula       in paper     our formula

1        100        100                 333        333
2        114        114.545...          359        358.615...
3        134        134.042...          389        388.5
4        162        161.538...          424        423.818...
5        203        203.225...          466        466.2
6        274        273.913...          518        518
7        420        420                 583        582.75
8        900        900                 666        666


which matches the desired values quite closely. It seems the authors of the paper erroneously rounded "114.54545..." down rather than up. I also double-checked the formula by using $S$=333, $L$=666 to reproduce the "Small ratio" numbers from table 1 of the paper.