The Riemann zeta function and tuning: Difference between revisions

Inthar (talk | contribs)
Mike Battaglia (talk | contribs)
better toc
Line 92: Line 92:


Note that for one of its neighbors, 271, it isn't entirely clear which peak value corresponds to the line of real values from +∞. This can be determined by looking at the absolute value of zeta along other s values, such as s=1 or s=3/4, and in this case the local minimum at 271.069 is the value in question. However, other peak values are not without their interest; the local maximum at 270.941, for instance, is associated to a different mapping for 3.
Note that for one of its neighbors, 271, it isn't entirely clear which peak value corresponds to the line of real values from +∞. This can be determined by looking at the absolute value of zeta along other s values, such as s=1 or s=3/4, and in this case the local minimum at 271.069 is the value in question. However, other peak values are not without their interest; the local maximum at 270.941, for instance, is associated to a different mapping for 3.
== Zeta EDO lists ==
=== Peak EDOs ===
If we examine the increasingly larger peak values of |Z(x)|, we find they occur with values of x such that Z'(x) = 0 near to integers, so that there is a sequence of [[EDO|edo]]s
{{EDOs|1, 2, 3, 4, 5, 7, 10, 12, 19, 22, 27, 31, 41, 53, 72, 99, 118, 130, 152, 171, 217, 224, 270, 342, 422, 441, 494, 742, 764, 935, 954, 1012, 1106, 1178, 1236, 1395, 1448, 1578, 2460, 2684, 3395, 5585, 6079, 7033, 8269, 8539, 11664, 14348, 16808, 28742, 34691, 36269, 57578, 58973, 95524, 102557, 112985, 148418, 212147, 241200,}} ... of ''zeta peak edos''. This is listed in the On-Line Encyclopedia of Integer Sequences as {{OEIS|A117536}}. Note that these peaks typically do not occur at exact integer values, but are close to integer values; this can be interpreted as the zeta function suggesting a "stretched octave" tuning for the EDO in question, similar to the [[TOP tuning]] (although the two tunings are in general not the same). As a result, this list can also be thought of as "tempered-octave zeta peak EDOs."
Alternatively (as [[User:Ks26|ground]] has found), if we allow no octave stretching and thus only look at the record |Z(x)| zeta scores corresponding to exact EDOs with pure octaves, we get {{EDOs|1, 2, 3, 5, 7, 10, 12, 19, 22, 31, 41, 53, 87, 118, 130, 171, 224, 270, 311, 472, 494, 742, 1065, 1106, 1395, 1578, 2460, 2684, 3566, 4231, 4973, 5585, 8269, 8539, 14124, 14348, 16808, 28742, 30631, 34691, 36269, 57578, 58973}} ... of ''zeta peak integer EDOs''. EDOs in this list not included in the previous are {{EDOs|87, 311, 472, 1065, 3566, 4231, 4973, 14124, 30631,}} ... and EDOs not included in this list but included in the previous are {{EDOs|4, 27, 72, 99, 152, 217, 342, 422, 441, 764, 935, 954, 1012, 1178, 1236, 1448, 3395, 6079, 7033, 11664,}} ... with 72's removal perhaps being the most surprising, showing the strength of 53 in that 72 does not improve on the peak of 53. This definition may be better for measuring how accurate the edo itself is without stretched octaves, whereas the previous list assumes that the octave is tempered along with all other intervals. This list can thus also be thought of as "pure-octave zeta peak EDOs." Similarly, we can look at pure-tritave and etc EDOs.
=== Integral of Zeta EDOs ===
Similarly, if we take the integral of |Z(x)| between successive zeros, and use this to define a sequence of increasing values for this integral, these again occur near integers and define an edo. This sequence, the ''zeta integral edos'', goes {{EDOs|2, 5, 7, 12, 19, 31, 41, 53, 72, 130, 171, 224, 270, 764, 954, 1178, 1395, 1578, 2684, 3395, 7033, 8269, 8539, 14348, 16808, 36269, 58973,}} ... This is listed in the OEIS as {{OEIS|A117538}}. The zeta integral edos seem to be, on the whole, the best of the zeta function sequences, but the other two should not be discounted; the peak values seem to give more weight to the lower primes, and the zeta gap sequence discussed below to the higher primes.
=== Zeta Gap EDOs ===
Finally, taking the midpoints of the successively larger normalized gaps between the zeros of Z leads to a list of ''zeta gap edos''. These are {{EDOs|2, 3, 5, 7, 12, 19, 31, 46, 53, 72, 270, 311, 954, 1178, 1308, 1395, 1578, 3395, 4190, 8539, 14348, 58973, 95524,}} ... Since the density of the zeros increases logarithmically, the normalization is to divide through by the log of the midpoint. These edos are listed in the OEIS as {{OEIS|A117537}}. The zeta gap edos seem to weight higher primes more heavily and have the advantage of being easy to compute from a table of zeros on the critical line.
=== Strict Zeta EDOs ===
We may define the ''strict zeta edos'' to be the edos that are in all four of the zeta edo lists. The list of strict zeta edos begins {{EDOs|2, 5, 7, 12, 19, 31, 53, 270, 1395, 1578, 8539, 14348, 58973}}... .
== Optimal Octave Stretch ==
Another use for the Riemann zeta function is to determine the optimal tuning for an EDO, meaning the optimal octave stretch. This is because the zeta peaks are typically not integers. The fractional part can give us the degree to which the generator diverges from what you would need to have the octave be a perfect 1200 cents. Here is a list of successively higher zeta peaks, taken to five decimal places:
<pre>
    0.00000
    1.12657
    1.97277
    3.05976
    3.90445
    5.03448
    6.95669
  10.00846
  12.02318
  18.94809
  22.02515
  27.08661
  30.97838
  40.98808
  52.99683
  71.95061
  99.04733
  117.96951
  130.00391
  152.05285
  170.99589
  217.02470
  224.00255
  270.01779
  341.97485
  422.05570
  441.01827
  494.01377
  742.01093
  764.01938
  935.03297
  953.94128
1012.02423
1105.99972
1177.96567
1236.02355
1394.98350
1447.97300
1577.98315
2459.98488
2683.99168
3395.02659
5585.00172
6079.01642
7032.96529
8268.98378
8539.00834
11664.01488
14347.99444
16807.99325
28742.01019
34691.00191
36268.98775
57578.00854
58972.99326
95524.04578
102557.01877
112984.99531
148418.01630
212146.99129
241199.99851
</pre>
== Removing primes ==
The [http://mathworld.wolfram.com/EulerProduct.html Euler product] for the Riemann zeta function is
<math>\zeta(s) = \prod_p (1 - p^{-s})^{-1}</math>
where the product is over all primes p. The product converges for values of s with real part greater than or equal to one, except for s=1 where it diverges to infinity. We may remove a finite list of primes from consideration by multiplying ζ(s) by the corresponding factors (1-p^(-s)) for each prime p we wish to remove. After we have done this, the smallest prime remaining will dominate peak values for s with large real part, and as before we can track these peaks backwards and, by analytical continuation, into the critical strip. In particular if we remove the prime 2, (1-2^(-s))ζ(s) is now dominated by 3, and the large peak values occur near equal divisions of the "tritave", ie 3.
Along the critical line, |1 - p^(-1/2-i t)| may be written
<math>\sqrt{1 + \frac{1}{p} - \frac{2 \cos(\ln p\ t)}{\sqrt{p}}}</math>
Multiplying the Z-function by this factor of adjustment gives a Z-function with the prime p removed from consideration. Zeta peak and zeta integral tunings may then be found as before.
Removing 2 leads to increasing adjusted peak values corresponding to the division of 3 (the "tritave") into 4, 7, 9, 13, 15, 17, 26, 32, 39, 45, 52, 56, 71, 75, 88, 131, 245, 316 ... parts. A striking feature of this list is the appearance not only of [[13edt|13edt]], the [[Bohlen-Pierce|Bohlen-Pierce]] division of the tritave, but the multiples 26, 39 and 52 also.
== The Black Magic Formulas ==
When [[Gene_Ward_Smith|Gene Smith]] discovered these formulas in the 70s, he thought of them as "black magic" formulas not because of any aura of evil, but because they seemed mysteriously to give you something for next to nothing. They are based on Gram points and the Riemann-Siegel theta function θ(t). Recall that a Gram point is a point on the critical line where ζ(1/2 + ig) is real. This implies that exp(iθ(g)) is real, so that θ(g)/π is an integer. Theta has an [[Wikipedia:asymptotic expansion|asymptotic expansion]]
<math>\theta(t) \sim \frac{t}{2}\log \frac{t}{2\pi} - \frac{t}{2} - \frac{\pi}{8}+\frac{1}{48t}+ \frac{7}{5760t^3}+\cdots</math>
From this we may deduce that θ(t)/π ≈ r ln(r) - r - 1/8, where r = t/2π = x/ln(2); hence while x is the number of equal steps to an octave, r is the number of equal steps to an "e-tave", meaning the interval of e, 1200/ln(2) = 1731.234 cents.
Recall that Gram points near to pure-octave edos, where x is an integer, can be expected to correspond to peak values of |ζ| = |Z|. We can find these Gram points by Newton's method applied to the above formula. If r = x/ln(2), and if n = floor(r ln(r) - r + 3/8) is the nearest integer to θ(2πr)/π, then we may set r⁺ = (r + n + 1/8)/ln(r). This is the first iteration of Newton's method, which we may repeat if we like, but in fact no more than one iteration is really required. This is the first black magic formula, giving an adjusted "Gram" tuning from the orginal one.
For an example, consider x = 12, so that r = 12/ln(2) = 17.312. Then r ln(r) - r - 1/8 = 31.927, which rounded to the nearest integer is 32, so n = 32. Then (r + n + 1/8)/ln(r) = 17.338, corresponding to x = 12.0176, which means a single step is 99.853 cents and the octave is tempered to twelve of these, which is 1198.238 cents.
The fact that x is slightly greater than 12 means 12 has an overall sharp quality. We may also find this out by looking at the value we computed for θ(2πr)/π, which was 31.927. Then 32 - 31.927 = 0.0726, which is positive but not too large; this is the second black magic formula, evaluating the nature of an edo x by computing floor(r ln(r) - r + 3/8) - r ln(r) + r + 1/8, where r = x/ln(2). This works more often than not on the clearcut cases, but when x is extreme it may not; 49 is very sharp in tendency, for example, but this method calls it as flat; similarly it counts 45 as sharp.
== Computing zeta ==
There are various approaches to the question of computing the zeta function, but perhaps the simplest is the use of the [[Wikipedia:Dirichlet eta function|Dirichlet eta function]] which was introduced to mathematics by [[Wikipedia:Johann Peter Gustav Lejeune Dirichlet|Johann Peter Gustav Lejeune Dirichlet]], who despite his name was a German and the brother-in-law of [[Wikipedia:Felix Mendelssohn|Felix Mendelssohn]].
The zeta function has a [http://mathworld.wolfram.com/SimplePole.html simple pole] at z=1 which forms a barrier against continuing it with its [[Wikipedia:Euler product|Euler product]] or [[Wikipedia:Dirichlet series|Dirichlet series]] representation. We could subtract off the pole, or multiply by a factor of (z-1), but at the expense of losing the character of a Dirichlet series or Euler product. A better method is to multiply by a factor of (1-2^(1-z)), leading to the eta function:
<math>\eta(z) = (1-2^{1-z})\zeta(z) = \sum_{n=1}^\infty (-1)^{n-1} n^{-z}
= \frac{1}{1^z} - \frac{1}{2^z} + \frac{1}{3^z} - \frac{1}{4^z} + \cdots</math>
The Dirichlet series for the zeta function is absolutely convergent when s&gt;1, justifying the rearrangement of terms leading to the alternating series for eta, which converges conditionally in the critical strip. The extra factor introduces zeros of the eta function at the points 1 + 2πix/ln(2) corresponding to pure octave divisions along the line s=1, but no other zeros, and in particular none in the critical strip and along the critical line. The convergence of the alternating series can be greatly accelerated by applying [[Wikipedia:Euler summation|Euler summation]].


= Mike Battaglia's Expanded Results =
= Mike Battaglia's Expanded Results =
Line 399: Line 278:


More can be found at the page on [[Harmonic_Entropy#Extending_HE_to_.5Bmath.5DN.3D.5Cinfty.5B.2Fmath.5D:_zeta-HE|Harmonic Entropy]], including a generalization to Renyi entropy for arbitrary <math>a</math>.
More can be found at the page on [[Harmonic_Entropy#Extending_HE_to_.5Bmath.5DN.3D.5Cinfty.5B.2Fmath.5D:_zeta-HE|Harmonic Entropy]], including a generalization to Renyi entropy for arbitrary <math>a</math>.
= Zeta EDO lists =
== Peak EDOs ==
If we examine the increasingly larger peak values of |Z(x)|, we find they occur with values of x such that Z'(x) = 0 near to integers, so that there is a sequence of [[EDO|edo]]s
{{EDOs|1, 2, 3, 4, 5, 7, 10, 12, 19, 22, 27, 31, 41, 53, 72, 99, 118, 130, 152, 171, 217, 224, 270, 342, 422, 441, 494, 742, 764, 935, 954, 1012, 1106, 1178, 1236, 1395, 1448, 1578, 2460, 2684, 3395, 5585, 6079, 7033, 8269, 8539, 11664, 14348, 16808, 28742, 34691, 36269, 57578, 58973, 95524, 102557, 112985, 148418, 212147, 241200,}} ... of ''zeta peak edos''. This is listed in the On-Line Encyclopedia of Integer Sequences as {{OEIS|A117536}}. Note that these peaks typically do not occur at exact integer values, but are close to integer values; this can be interpreted as the zeta function suggesting a "stretched octave" tuning for the EDO in question, similar to the [[TOP tuning]] (although the two tunings are in general not the same). As a result, this list can also be thought of as "tempered-octave zeta peak EDOs."
Alternatively (as [[User:Ks26|ground]] has found), if we allow no octave stretching and thus only look at the record |Z(x)| zeta scores corresponding to exact EDOs with pure octaves, we get {{EDOs|1, 2, 3, 5, 7, 10, 12, 19, 22, 31, 41, 53, 87, 118, 130, 171, 224, 270, 311, 472, 494, 742, 1065, 1106, 1395, 1578, 2460, 2684, 3566, 4231, 4973, 5585, 8269, 8539, 14124, 14348, 16808, 28742, 30631, 34691, 36269, 57578, 58973}} ... of ''zeta peak integer EDOs''. EDOs in this list not included in the previous are {{EDOs|87, 311, 472, 1065, 3566, 4231, 4973, 14124, 30631,}} ... and EDOs not included in this list but included in the previous are {{EDOs|4, 27, 72, 99, 152, 217, 342, 422, 441, 764, 935, 954, 1012, 1178, 1236, 1448, 3395, 6079, 7033, 11664,}} ... with 72's removal perhaps being the most surprising, showing the strength of 53 in that 72 does not improve on the peak of 53. This definition may be better for measuring how accurate the edo itself is without stretched octaves, whereas the previous list assumes that the octave is tempered along with all other intervals. This list can thus also be thought of as "pure-octave zeta peak EDOs." Similarly, we can look at pure-tritave and etc EDOs.
== Integral of Zeta EDOs ==
Similarly, if we take the integral of |Z(x)| between successive zeros, and use this to define a sequence of increasing values for this integral, these again occur near integers and define an edo. This sequence, the ''zeta integral edos'', goes {{EDOs|2, 5, 7, 12, 19, 31, 41, 53, 72, 130, 171, 224, 270, 764, 954, 1178, 1395, 1578, 2684, 3395, 7033, 8269, 8539, 14348, 16808, 36269, 58973,}} ... This is listed in the OEIS as {{OEIS|A117538}}. The zeta integral edos seem to be, on the whole, the best of the zeta function sequences, but the other two should not be discounted; the peak values seem to give more weight to the lower primes, and the zeta gap sequence discussed below to the higher primes.
== Zeta Gap EDOs ==
Finally, taking the midpoints of the successively larger normalized gaps between the zeros of Z leads to a list of ''zeta gap edos''. These are {{EDOs|2, 3, 5, 7, 12, 19, 31, 46, 53, 72, 270, 311, 954, 1178, 1308, 1395, 1578, 3395, 4190, 8539, 14348, 58973, 95524,}} ... Since the density of the zeros increases logarithmically, the normalization is to divide through by the log of the midpoint. These edos are listed in the OEIS as {{OEIS|A117537}}. The zeta gap edos seem to weight higher primes more heavily and have the advantage of being easy to compute from a table of zeros on the critical line.
== Strict Zeta EDOs ==
We may define the ''strict zeta edos'' to be the edos that are in all four of the zeta edo lists. The list of strict zeta edos begins {{EDOs|2, 5, 7, 12, 19, 31, 53, 270, 1395, 1578, 8539, 14348, 58973}}... .
= Optimal Octave Stretch =
Another use for the Riemann zeta function is to determine the optimal tuning for an EDO, meaning the optimal octave stretch. This is because the zeta peaks are typically not integers. The fractional part can give us the degree to which the generator diverges from what you would need to have the octave be a perfect 1200 cents. Here is a list of successively higher zeta peaks, taken to five decimal places:
<pre>
    0.00000
    1.12657
    1.97277
    3.05976
    3.90445
    5.03448
    6.95669
  10.00846
  12.02318
  18.94809
  22.02515
  27.08661
  30.97838
  40.98808
  52.99683
  71.95061
  99.04733
  117.96951
  130.00391
  152.05285
  170.99589
  217.02470
  224.00255
  270.01779
  341.97485
  422.05570
  441.01827
  494.01377
  742.01093
  764.01938
  935.03297
  953.94128
1012.02423
1105.99972
1177.96567
1236.02355
1394.98350
1447.97300
1577.98315
2459.98488
2683.99168
3395.02659
5585.00172
6079.01642
7032.96529
8268.98378
8539.00834
11664.01488
14347.99444
16807.99325
28742.01019
34691.00191
36268.98775
57578.00854
58972.99326
95524.04578
102557.01877
112984.99531
148418.01630
212146.99129
241199.99851
</pre>
= Removing primes =
The [http://mathworld.wolfram.com/EulerProduct.html Euler product] for the Riemann zeta function is
<math>\zeta(s) = \prod_p (1 - p^{-s})^{-1}</math>
where the product is over all primes p. The product converges for values of s with real part greater than or equal to one, except for s=1 where it diverges to infinity. We may remove a finite list of primes from consideration by multiplying ζ(s) by the corresponding factors (1-p^(-s)) for each prime p we wish to remove. After we have done this, the smallest prime remaining will dominate peak values for s with large real part, and as before we can track these peaks backwards and, by analytical continuation, into the critical strip. In particular if we remove the prime 2, (1-2^(-s))ζ(s) is now dominated by 3, and the large peak values occur near equal divisions of the "tritave", ie 3.
Along the critical line, |1 - p^(-1/2-i t)| may be written
<math>\sqrt{1 + \frac{1}{p} - \frac{2 \cos(\ln p\ t)}{\sqrt{p}}}</math>
Multiplying the Z-function by this factor of adjustment gives a Z-function with the prime p removed from consideration. Zeta peak and zeta integral tunings may then be found as before.
Removing 2 leads to increasing adjusted peak values corresponding to the division of 3 (the "tritave") into 4, 7, 9, 13, 15, 17, 26, 32, 39, 45, 52, 56, 71, 75, 88, 131, 245, 316 ... parts. A striking feature of this list is the appearance not only of [[13edt|13edt]], the [[Bohlen-Pierce|Bohlen-Pierce]] division of the tritave, but the multiples 26, 39 and 52 also.
== The Black Magic Formulas ==
When [[Gene_Ward_Smith|Gene Smith]] discovered these formulas in the 70s, he thought of them as "black magic" formulas not because of any aura of evil, but because they seemed mysteriously to give you something for next to nothing. They are based on Gram points and the Riemann-Siegel theta function θ(t). Recall that a Gram point is a point on the critical line where ζ(1/2 + ig) is real. This implies that exp(iθ(g)) is real, so that θ(g)/π is an integer. Theta has an [[Wikipedia:asymptotic expansion|asymptotic expansion]]
<math>\theta(t) \sim \frac{t}{2}\log \frac{t}{2\pi} - \frac{t}{2} - \frac{\pi}{8}+\frac{1}{48t}+ \frac{7}{5760t^3}+\cdots</math>
From this we may deduce that θ(t)/π ≈ r ln(r) - r - 1/8, where r = t/2π = x/ln(2); hence while x is the number of equal steps to an octave, r is the number of equal steps to an "e-tave", meaning the interval of e, 1200/ln(2) = 1731.234 cents.
Recall that Gram points near to pure-octave edos, where x is an integer, can be expected to correspond to peak values of |ζ| = |Z|. We can find these Gram points by Newton's method applied to the above formula. If r = x/ln(2), and if n = floor(r ln(r) - r + 3/8) is the nearest integer to θ(2πr)/π, then we may set r⁺ = (r + n + 1/8)/ln(r). This is the first iteration of Newton's method, which we may repeat if we like, but in fact no more than one iteration is really required. This is the first black magic formula, giving an adjusted "Gram" tuning from the orginal one.
For an example, consider x = 12, so that r = 12/ln(2) = 17.312. Then r ln(r) - r - 1/8 = 31.927, which rounded to the nearest integer is 32, so n = 32. Then (r + n + 1/8)/ln(r) = 17.338, corresponding to x = 12.0176, which means a single step is 99.853 cents and the octave is tempered to twelve of these, which is 1198.238 cents.
The fact that x is slightly greater than 12 means 12 has an overall sharp quality. We may also find this out by looking at the value we computed for θ(2πr)/π, which was 31.927. Then 32 - 31.927 = 0.0726, which is positive but not too large; this is the second black magic formula, evaluating the nature of an edo x by computing floor(r ln(r) - r + 3/8) - r ln(r) + r + 1/8, where r = x/ln(2). This works more often than not on the clearcut cases, but when x is extreme it may not; 49 is very sharp in tendency, for example, but this method calls it as flat; similarly it counts 45 as sharp.
= Computing zeta =
There are various approaches to the question of computing the zeta function, but perhaps the simplest is the use of the [[Wikipedia:Dirichlet eta function|Dirichlet eta function]] which was introduced to mathematics by [[Wikipedia:Johann Peter Gustav Lejeune Dirichlet|Johann Peter Gustav Lejeune Dirichlet]], who despite his name was a German and the brother-in-law of [[Wikipedia:Felix Mendelssohn|Felix Mendelssohn]].
The zeta function has a [http://mathworld.wolfram.com/SimplePole.html simple pole] at z=1 which forms a barrier against continuing it with its [[Wikipedia:Euler product|Euler product]] or [[Wikipedia:Dirichlet series|Dirichlet series]] representation. We could subtract off the pole, or multiply by a factor of (z-1), but at the expense of losing the character of a Dirichlet series or Euler product. A better method is to multiply by a factor of (1-2^(1-z)), leading to the eta function:
<math>\eta(z) = (1-2^{1-z})\zeta(z) = \sum_{n=1}^\infty (-1)^{n-1} n^{-z}
= \frac{1}{1^z} - \frac{1}{2^z} + \frac{1}{3^z} - \frac{1}{4^z} + \cdots</math>
The Dirichlet series for the zeta function is absolutely convergent when s&gt;1, justifying the rearrangement of terms leading to the alternating series for eta, which converges conditionally in the critical strip. The extra factor introduces zeros of the eta function at the points 1 + 2πix/ln(2) corresponding to pure octave divisions along the line s=1, but no other zeros, and in particular none in the critical strip and along the critical line. The convergence of the alternating series can be greatly accelerated by applying [[Wikipedia:Euler summation|Euler summation]].


= Links =
= Links =