The Riemann zeta function and tuning: Difference between revisions
ArrowHead294 (talk | contribs) |
No edit summary |
||
(45 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
{{Texops}} | {{Texops}} | ||
{{Wikipedia|Riemann zeta function}} | {{Wikipedia|Riemann zeta function}} | ||
The Riemann zeta function is a famous mathematical function, best known for its relationship with the Riemann hypothesis, a 200-year old unsolved problem involving the distribution of the prime numbers. However, it also has an intriguing musical interpretation: the zeta function shows how | The Riemann zeta function is a famous mathematical function, best known for its relationship with the Riemann hypothesis, a 200-year old unsolved problem involving the distribution of the prime numbers. However, it also has an intriguing musical interpretation: the zeta function shows how "well" a given [[equal temperament]] approximates the no-limit [[just intonation]] relative to its size. | ||
As a result, although the zeta function is best known for its use in analytic number theory, the zeta function is present in the background of some tuning theory — the [[harmonic entropy]] model of [[concordance]] can be shown to be related to the Fourier transform of the zeta function, and several tuning-theoretic metrics, if extended to the infinite-limit, yield expressions that are related to the zeta function. Sometimes these are in terms of the "prime zeta function", which is closely related and can also be derived as a simple expression of the zeta function. | As a result, although the zeta function is best known for its use in analytic number theory, the zeta function is present in the background of some tuning theory — the [[harmonic entropy]] model of [[concordance]] can be shown to be related to the Fourier transform of the zeta function, and several tuning-theoretic metrics, if extended to the infinite-limit, yield expressions that are related to the zeta function. Sometimes these are in terms of the "prime zeta function", which is closely related and can also be derived as a simple expression of the zeta function. | ||
Line 9: | Line 7: | ||
If you look for a filter to quickly sort all the equal temperaments into those that approximate JI well and those that do not, the [[#Zeta edo lists|edo lists]] below can be useful. The caveat is that it collapses the variety of characteristics of a temperament to a one-dimensional rating, with little capacity to show the nuances of each system. It is therefore best to keep in mind that judging the temperaments by zeta is no replacement for investigating each temperament in detail. | If you look for a filter to quickly sort all the equal temperaments into those that approximate JI well and those that do not, the [[#Zeta edo lists|edo lists]] below can be useful. The caveat is that it collapses the variety of characteristics of a temperament to a one-dimensional rating, with little capacity to show the nuances of each system. It is therefore best to keep in mind that judging the temperaments by zeta is no replacement for investigating each temperament in detail. | ||
There are other metrics besides zeta for other definitions of "approximating well", | There are other metrics besides zeta for other definitions of "approximating well", which you can find in: [[:Category:Regular temperament tuning|optimised regular temperament tunings]]. | ||
Much of the below is thanks to the insights of [[Gene Ward Smith]]. Below is the original derivation as he presented it, followed by a different derivation from [[Mike Battaglia]] below which extends some of the results. | Much of the below is thanks to the insights of [[Gene Ward Smith]]. Below is the original derivation as he presented it, followed by a different derivation from [[Mike Battaglia]] below which extends some of the results. | ||
Line 18: | Line 16: | ||
'''Zeta record edo:''' An equal tuning that sets some kind of record in regards to the zeta function compared to all smaller equal tunings. | '''Zeta record edo:''' An equal tuning that sets some kind of record in regards to the zeta function compared to all smaller equal tunings. | ||
''' | '''Record zeta peak:''' An equal tuning which is closer to JI than any previous tuning, and is usually an EDO with compressed or stretched octaves, evaluated by the absolute "goodness" of the edo according to the zeta function. | ||
''' | '''Record zeta peak integer:''' A zeta record edo by absolute "goodness", when compared only to other edos (i.e. ignoring stretched/compressed equivalences). | ||
'''Zero:''' A point where the Riemann zeta function is equal to zero, such as ~2.759edo, representing an equal tuning that does not represent JI much at all. EDOs close to zeroes are called zeta valley EDOs; all known zeroes are on the "critical line" used to obtain tuning information. | '''Zero:''' A point where the Riemann zeta function is equal to zero, such as ~2.759edo, representing an equal tuning that does not represent JI much at all. EDOs close to zeroes are called ''zeta valley EDOs''; all known zeroes are on the "critical line" used to obtain tuning information. | ||
''' | '''Record z gap:''' A zeta record edo by the size of the gap between its surrounding zeroes, adjusted for the fact that zeroes generally become more dense with larger inputs. | ||
''' | '''Record zeta integral:''' A zeta record edo by the size of the area enclosed by the shape of the function between the edo's surrounding zeroes. | ||
== Quick info: zeta peak edos == | == Quick info: zeta peak edos == | ||
These lists give the best [[equal divisions of the octave]] for their size according to the zeta metric. | These lists give the best [[equal divisions of the octave]] for their size according to the zeta metric. | ||
Zeta peak integer EDOs ( | Zeta peak integer EDOs (pure octaves): {{EDOs|1, 2, 3, 5, 7, 10, 12, 19, 22, 31, 41, 53, 87, 118, 130, 171, 224, 270, 311, ...}} | ||
Zeta peak EDOs ( | Zeta peak EDOs (tempered octaves): {{EDOs|1, 2, 3, 4, 5, 7, 10, 12, 19, 22, 27, 31, 41, 53, 72, 99, 118, 130, 152, 171, 217, 224, 270, ...}} | ||
See the [[#Zeta edo lists|section below]] for more information. | See the [[#Zeta edo lists|section below]] for more information. | ||
== Graph links == | == Graph links == | ||
A link to the graph of zeta can be found at [https://samuelj.li/complex-function-plotter/#abs(zeta(i*2*pi*real(z)%2Fln(2)%2Bimag(z))) Zeta in Samuelj Plotter]. (In the top left menu, make sure that "Enable Checkerboard" is unticked and "Invert Gradient" and "Continuous Gradient" are ticked.) The function has been reoriented to place EDO size along the horizontal axis and weight along the vertical axis, and also scaled by | A link to the graph of zeta can be found at [https://samuelj.li/complex-function-plotter/#abs(zeta(i*2*pi*real(z)%2Fln(2)%2Bimag(z))) Zeta in Samuelj Plotter]. (In the top left menu, make sure that "Enable Checkerboard" is unticked and "Invert Gradient" and "Continuous Gradient" are ticked.) The function has been reoriented to place EDO size along the horizontal axis and weight along the vertical axis, and also scaled by {{sfrac|2π|ln(2)}} to ensure that the real number line aligns with edos. One can see that with higher weights, the function approaches a cyclic function with a period of 1; this corresponds to the prime 2 dominating more and more extremely as other harmonics are weighted less with higher weights. You can see this easier by raising the entire expression to an absurdly high power, such as 100. Note, however, that this visualization is inaccurate beyond a couple hundred: around 146.5, 324.5 and 473.5, and in many cases after, there appear to be zeroes that are not on the critical line; this is an artifact of the way the function is approximated and is the ultimate reason why the Riemann hypothesis remains unsolved. These actually correspond to zeroes that are very close together but on the critical line. | ||
You may also view the graph of zeta along the critical line on Desmos: [https://www.desmos.com/calculator/dstp7wnidf Zeta in Desmos]. This makes it easier to see peaks, but only works for {{nowrap|σ {{=}} {{sfrac|1|2}}}}. | |||
=== Plots === | |||
Below are some demonstrative plots of the zeta function (strictly speaking, the [[#The Z function: a mathematically convenient version of zeta|Z function]]) on the critical line. | |||
Using the [http://functions.wolfram.com/webMathematica/FunctionPlotting.jsp?name=RiemannSiegelZ online plotter] we can plot Z in the regions corresponding to scale divisions, using the conversion factor {{nowrap|''t'' {{=}} {{sfrac|2π|ln(2)}}''x''}}, for ''x'' a number near or at an edo number. Hence, for instance, to plot 12 plot around 108.777, to plot 31 plot around 281.006, and so forth. An alternative plotter is the applet [http://web.viu.ca/pughg/RiemannZeta/RiemannZetaLong.html here]. | |||
If you have access to {{w|Mathematica}}, which has Z, zeta and theta as a part of its suite of initially defined functions, you can do even better. Below is a Mathematica-generated plot of Z{{pars|{{sfrac|2π''x''|ln(2)}}|1.8}} in the region around [[12edo]]: | |||
[[File:plot12.png|alt=plot12.png|plot12.png]] | |||
The peak around 12 is both higher and wider than the local maximums above 11 and 13, indicating its superiority as an approximation of JI. Note also that the peak occurs at a point slightly larger than 12; this indicates the octave is slightly compressed in the zeta tuning for 12. The size of a step in octaves is 1/''x'', and hence the size of the octave in the zeta peak value tuning for ''N''edo is ''N''/''x''; if ''x'' is slightly larger than ''N'' as here with {{nowrap|''N'' {{=}} 12}}, the size of the zeta tuned octave will be slightly less than a pure octave. Similarly, when the peak occurs with ''x'' less than ''N'', we have stretched octaves. | |||
For larger edos, the width of the peak narrows, but for strong edos the height more than compensates, measured in terms of the area under the peak (the absolute value of the integral of Z between two zeros.) Note how [[270edo]] completely dominates its neighbors: | |||
[[File:plot270.png|alt=plot270.png|plot270.png]] | |||
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 {{nowrap|''s'' {{=}} 1}} or {{nowrap|''s'' {{=}} {{sfrac|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. | |||
You | To generate this plot using the free version of Wolfram Cloud, you can run <code>Plot[Abs[RiemannSiegelZ[9.06472028x]], {x, 11.9, 12.1}]</code> and then in the menu select '''Evaluation > Evaluate Cells'''. Change "'''11.9'''" and "'''12.1'''" to whatever values you want, e.g. to view the curve around 15edo you might use the values "'''14.9'''" and "'''15.1'''". | ||
You can also view the plot using [https://www.desmos.com/calculator/dstp7wnidf Zeta in Desmos]. | |||
== Gene Smith's original derivation == | == Gene Smith's original derivation == | ||
Suppose ''x'' is a variable representing some equal division of the octave. For example, if {{nowrap|''x'' {{=}} 80}}, ''x'' corresponds to [[80edo]] with a step size of 15 [[cent]]s and with pure octaves. Suppose that ''x'' can also be continuous, so that it can also represent fractional or "nonoctave" divisions as well, so that it ranges over all possible [[equal temperament]]s. The [[Bohlen–Pierce scale]], 13 equal divisions of 3/1, is approximately 8.202 equal divisions of the "octave" (although the octave itself does not appear in this tuning), and would hence be represented by a value of {{nowrap|''x'' {{=}} 8.202}}. | |||
Suppose ''x'' is a variable representing some equal division of the octave. For example, if {{nowrap|''x'' {{=}} 80}}, ''x'' | |||
Now suppose that [https://www.desmos.com/calculator/krigk43int {{rr|''x''}}] denotes the difference between ''x'' and the integer nearest to ''x'': | Now suppose that [https://www.desmos.com/calculator/krigk43int {{rr|''x''}}] denotes the difference between ''x'' and the integer nearest to ''x'': | ||
Line 54: | Line 72: | ||
For example, {{nowrap|{{rr|8.202}} {{=}} 0.202}}, since it is the difference between 8.202 and the nearest integer, which is 8. Meanwhile, {{nowrap|{{rr|7.95}} {{=}} 0.05}}, which is the difference between 7.95 and the nearest integer, which is 8. This represents the absolute relative error of the octave in equal tuning ''x'', or alternatively how much x is detuned from an edo. | For example, {{nowrap|{{rr|8.202}} {{=}} 0.202}}, since it is the difference between 8.202 and the nearest integer, which is 8. Meanwhile, {{nowrap|{{rr|7.95}} {{=}} 0.05}}, which is the difference between 7.95 and the nearest integer, which is 8. This represents the absolute relative error of the octave in equal tuning ''x'', or alternatively how much x is detuned from an edo. | ||
For any value of ''x'', we can construct a ''p''-limit [[ | For any value of ''x'', we can construct a ''p''-[[limit]] [[val]] by rounding {{nowrap|''x'' log<sub>2</sub>(''q'')}} to the nearest integer for each prime ''q'' up to ''p''. (More technically, this corresponds to what's known as a [[generalized patent val]].) For example, for {{nowrap|''x'' {{=}} 12}}, we find 2 at 12, 3 at 19, 5 at 28, etc. Now consider [https://www.desmos.com/calculator/4uamhon9tt the function] | ||
<math> | <math> | ||
Line 61: | Line 79: | ||
</math> | </math> | ||
Here, the numerator represents the relative error on each prime, and the denominator represents a weight factor of the logarithm of each prime, so the function represents a p-limit badness metric. | Here, the numerator represents the relative error on each prime, and the denominator represents a weight factor of the logarithm of each prime*, so the function represents a p-limit badness metric. | ||
This function has local minima, corresponding to associated generalized patent vals. The minima occur for values of ''x'' which are the [[Tenney-Euclidean_Tuning|Tenney-Euclidean tuning]]s of the octaves of the associated vals, while ξ<sub>''p''</sub> for these minima is the square of the [[ | (<nowiki>*</nowiki> Specifically, the reason we use the weighting 1/log<sub>2</sub>(''p'') is because of certain desirable properties it has that singles it out as of unique interest: if the complexity of a prime ''p'' is {{nowrap| log<sub>2</sub>(''p'') }}, then ''p''<sup>n</sup> is ''n'' times as complex as ''p''. Using {{nowrap| log<sub>2</sub>(''p'') }} as the complexity also means that the complexity of a harmonic, according to its prime factorization, exactly matches where it's found in the harmonic series, so that e.g. {{nowrap| 25 {{=}} 5 × 5 }} is slightly less complex than {{nowrap| 26 {{=}} 2 × 13 }} is slightly less complex than {{nowrap| 27 {{=}} 3 × 3 × 3 }}. Therefore, the {{nowrap| 1/log<sub>2</sub>(''p'') }} weighting is a kind of natural inverse-complexity weighting, that is, a simplicity weighting.) | ||
(Also, for those unfamiliar, squaring the error is commonly done because it solves the flaws of two alternative ways of measuring error. Specifically, if you look only at the maximum error, you miss opportunities to make the tuning much better ''overall'' by allowing slightly more damage on the most damaged intervals, while if you look only at the average error, then it may be that you are unnecessarily damaging a few intervals a lot just to get intervals that are already in-tune slightly more in-tune, so both extremes have pathological behaviours, and using the squared error counters both of these behaviours so that it represents a more balanced approach to optimization that is used in a variety of disciplines.) | |||
This function has local minima, corresponding to associated generalized patent vals. The minima occur for values of ''x'' which are the [[Tenney-Euclidean_Tuning|Tenney-Euclidean tuning]]s of the octaves of the associated vals, while ξ<sub>''p''</sub> for these minima is the square of the [[Tenney–Euclidean relative error]] of the val—equal to the TE error times the TE complexity, and sometimes known as "TE simple badness." | |||
Now suppose we don't want a formula for any specific prime limit, but which applies to all primes. We can't take the above sum to infinity, since it doesn't converge. However, we could [https://www.desmos.com/calculator/0qhhewlsaz change the weighting factor to a power] so that it does converge: | Now suppose we don't want a formula for any specific prime limit, but which applies to all primes. We can't take the above sum to infinity, since it doesn't converge. However, we could [https://www.desmos.com/calculator/0qhhewlsaz change the weighting factor to a power] so that it does converge: | ||
<math>\displaystyle \xi_\infty(x) = \sum_{\substack{q \geq 2 \\ q \text{ prime}}} \frac{\lfloor x \log_2 q \rceil^2}{q^s}</math> | <math>\displaystyle \xi_\infty(x) = \sum_{\substack{q \geq 2 \\ q \text{ prime}}} \frac{\lfloor x \log_2 q \rceil^2}{q^s}</math> | ||
Importantly, when {{nowrap|''s'' {{=}} 1}}, the weighting is 1/''p'' for a prime ''p'', so that it's very similar to a {{sfrac|1|''p'' − 1}} weighting. This latter weighting is equal to the average number of times prime ''p'' occurs as a factor in the harmonic series, counting repetition, so is of interest because it represents how many harmonics will feel damage from this prime being mistuned. Therefore, the weighting {{nowrap| 1/''p'' }} corresponds to under-prioritizing small primes slightly (with the effect being less slight the smaller the prime, so that at the most extreme, at prime 2 we have 1/2 instead of 1/1 weighting and at prime 3 we have 1/3 instead of 1/2 weighting). | |||
Seeing that we notate the power as ''s'', it might become apparent where the Riemann zeta function will eventually show up. | Seeing that we notate the power as ''s'', it might become apparent where the Riemann zeta function will eventually show up. | ||
If ''s'' is greater than one, this does converge. However, we might want to make a few adjustments. For one thing, if the error is low enough that the tuning is consistent, then the error of the square of a prime is twice that of the prime, of the cube tripled, and so forth until the error becomes inconsistent. When the weighting uses logarithms and error measures are consistent, then the logarithmic weighting cancels this effect out, so we might consider that prime powers were implicitly included in the Tenney-Euclidean | If ''s'' is greater than one, this does converge. However, we might want to make a few adjustments. For one thing, if the error is low enough that the tuning is consistent, then the error of the square of a prime is twice that of the prime, of the cube tripled, and so forth until the error becomes inconsistent. When the weighting uses logarithms and error measures are consistent, then the logarithmic weighting cancels this effect out, so we might consider that prime powers were implicitly included in the Tenney-Euclidean measure—in fact, the primary intuition behind Tenney weighting is that it is the weighting pattern that values 25, 27, and 29 approximately evenly in importance despite being different powers. We can go ahead and include them by adding a factor of {{sfrac|1|''n''}} for each prime power ''p''<sup>''n''</sup>. A somewhat peculiar but useful way to write the result of doing this is in terms of the {{w|von Mangoldt function}}, an {{w|arithmetic function}} on positive integers which is equal to ln(''p'') on prime powers ''p''<sup>''n''</sup>, and is zero elsewhere. This is written using a capital lambda, as Λ(''n''), and in terms of it we can include prime powers in our error function as | ||
<math>\displaystyle \xi_\infty(x) = \sum_{n \geq 1} \frac{\Lambda(n)}{\ln n} \frac{\lfloor x \log_2 n \rceil^2}{n^s}</math> | <math>\displaystyle \xi_\infty(x) = \sum_{n \geq 1} \frac{\Lambda(n)}{\ln n} \frac{\lfloor x \log_2 n \rceil^2}{n^s}</math> | ||
Line 88: | Line 112: | ||
This new function has the property that {{nowrap|F<sub>s</sub>(''x'') {{=}} F<sub>s</sub>(0) − E<sub>s</sub>(''x'')}}, so that all we have done is flip the sign of E<sub>s</sub>(''x'') and offset it vertically. This now increases to a maximum value for low errors, rather than declining to a minimum. | This new function has the property that {{nowrap|F<sub>s</sub>(''x'') {{=}} F<sub>s</sub>(0) − E<sub>s</sub>(''x'')}}, so that all we have done is flip the sign of E<sub>s</sub>(''x'') and offset it vertically. This now increases to a maximum value for low errors, rather than declining to a minimum. | ||
Of more interest is the fact that it is a known mathematical function. | |||
The logarithm of the {{w|Riemann zeta function}} function can be expressed in terms of a {{w|Dirichlet series}} involving the von Mangoldt function: | Of more interest is the fact that it is a known mathematical function. The logarithm of the {{w|Riemann zeta function}} function {{subpage|appendix|u|s=Dirichlet series for the von Mangoldt function|text=can be expressed}} in terms of a {{w|Dirichlet series}} involving the von Mangoldt function: | ||
<math>\displaystyle | <math>\displaystyle | ||
Line 99: | Line 123: | ||
<math>\displaystyle | <math>\displaystyle | ||
\cos(2 \pi x \log_2 n) | \cos(2 \pi x \log_2 n) | ||
= \mathrm{Re}\left( \exp{(2 \pi i x \log_2 n)} \right) | = \mathrm{Re}\left( \exp{(- 2 \pi i x \log_2 n)} \right) | ||
= \mathrm{Re}\left( n^{\frac{2 \pi i}{\ln 2} x} \right) | = \mathrm{Re}\left( n^{- \frac{2 \pi i}{\ln 2} x} \right) | ||
</math> | </math> | ||
Line 107: | Line 131: | ||
<math>\displaystyle | <math>\displaystyle | ||
F_s(x) | F_s(x) | ||
= \mathrm{Re} \left( \sum_{n=2}^\infty \frac{\Lambda(n)}{\ln n} \frac{n^{\frac{2 \pi i}{\ln 2} x}}{n^s} \right) | = \mathrm{Re} \left( \sum_{n=2}^\infty \frac{\Lambda(n)}{\ln n} \frac{n^{- \frac{2 \pi i}{\ln 2} x}}{n^s} \right) | ||
= \mathrm{Re} \left( \ln \zeta \left(s + \frac{2 \pi i}{\ln 2}x \right) \right) | = \mathrm{Re} \left( \ln \zeta \left(s + \frac{2 \pi i}{\ln 2}x \right) \right) | ||
</math> | </math> | ||
Line 117: | Line 141: | ||
so that we see that the absolute value of the zeta function serves to measure the relative error of an equal division. | so that we see that the absolute value of the zeta function serves to measure the relative error of an equal division. | ||
There is an open question as to whether the analytic continuation preserves the properties we are interested in, though empirically it seems to. However, if you do not want to trust the analytic continuation, then the {{nowrap| ''s'' {{=}} 1 }} line is of interest for the reasons discussed, as though the infinite sum does not converge, every sum for {{nowrap| ''s'' > 1 }} ''does'' converge, so that we can consider the line at {{nowrap| ''s'' {{=}} 1 }} as being the "limit" as ''s'' approaches 1 from above. This can also be used to sanity-check results at {{nowrap| ''s'' {{=}} 1/2 }} by seeing where they agree, e.g. as done in the section on [[#Absolute zeta peak edos]], which looks at getting more practical tuning information out of the zeta function via an adjustment for considering absolute mistuning rather than relative error. | |||
== Mike Battaglia's expanded results == | == Mike Battaglia's expanded results == | ||
Line 215: | Line 187: | ||
We'll deal with each of these separately. | We'll deal with each of these separately. | ||
First, in the leftmost summation, we can see that {{nowrap|''n'' {{=}} ''d''}} implies {{nowrap|ln | First, in the leftmost summation, we can see that {{nowrap|''n'' {{=}} ''d''}} implies {{nowrap|ln{{pars|{{sfrac|''n''|''d''}}|1.8}} {{=}} 0}}. Since {{nowrap|sin(0) {{=}} 0}}, the sin term in the numerator cancels out, yielding: | ||
<math> \displaystyle | <math> \displaystyle | ||
Line 230: | Line 202: | ||
\frac{\cos\left(t \ln\left({\tfrac{q}{p}}\right)\right) - i\sin\left(t \ln\left({\tfrac{q}{p}}\right)\right)}{(pq)^{\sigma}}</math> | \frac{\cos\left(t \ln\left({\tfrac{q}{p}}\right)\right) - i\sin\left(t \ln\left({\tfrac{q}{p}}\right)\right)}{(pq)^{\sigma}}</math> | ||
Now, noting that {{nowrap|ln | Now, noting that {{nowrap|ln{{pars|{{sfrac|''p''|''q''}}|1.8}} {{=}} −ln{{pars|{{sfrac|''q''|''p''}}|1.8}}}} and that sin is an odd function, we can see that the sin terms cancel out, leaving | ||
<math> \displaystyle | <math> \displaystyle | ||
Line 256: | Line 228: | ||
=== Interpretation of results: "cosine relative error" === | === Interpretation of results: "cosine relative error" === | ||
For every strictly positive rational ''n''/''d'', there is a cosine with period {{nowrap| | For every strictly positive rational ''n''/''d'', there is a cosine with period {{nowrap|log<sub>2</sub>{{pars|{{sfrac|''n''|''d''}}|1.8}}}}. This cosine peaks at {{nowrap|''x'' {{=}} {{sfrac|''N''|log<sub>2</sub>(''n''/''d'')}}}} for all integers ''N'', or in other words, the Nth-equal division of the rational number {{frac|''n''|''d''}}, and hits troughs midway between. | ||
Our mysterious substitution above was chosen to set the units for this up nicely. The variable x now happens to be measured in divisions of the octave. (The original variable ''t'', which was the imaginary part of the zeta argument ''s'', can be thought of as the number of divisions of the interval {{nowrap|''e''<sup>2π</sup> ≈ 535.49}}, or what [[Keenan_Pepper|Keenan Pepper]] has called the "[[zetave|natural interval]].") | Our mysterious substitution above was chosen to set the units for this up nicely. The variable x now happens to be measured in divisions of the octave. (The original variable ''t'', which was the imaginary part of the zeta argument ''s'', can be thought of as the number of divisions of the interval {{nowrap|''e''<sup>2π</sup> ≈ 535.49}}, or what [[Keenan_Pepper|Keenan Pepper]] has called the "[[zetave|natural interval]].") | ||
Line 354: | Line 326: | ||
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>. | ||
== The matter of sigma: the critical strip, zeta peaks, and Gram points == | |||
So long as {{nowrap|''s'' ≥ 1}}, the absolute value of the zeta function can be seen as a relative error measurement. However, the rationale for that view of things departs when {{nowrap|''s'' < 1}}, particularly in the [http://mathworld.wolfram.com/CriticalStrip.html critical strip], when {{nowrap|0 < ''s'' < 1}}. As s approaches the value {{nowrap|''s'' {{=}} {{sfrac|1|2}}}} of the [http://mathworld.wolfram.com/CriticalLine.html critical line], the "information content" of the zeta function concerning higher primes increases and it behaves increasingly like a badness measure (or more correctly, since we have inverted it, like a goodness measure.) The quasi-symmetric [https://planetmath.org/encyclopedia/FunctionalEquationOfTheRiemannZetaFunction.html functional equation] of the zeta function tells us that past the critical line the information content starts to decrease again, with {{nowrap|1 − ''s''}} and ''s'' having the same information content; that is, for ''s'' > {{sfrac|1|2}}, {{nowrap|1 − ''s''}} essentially multiplies the zeta function at ''s'' by a fixed, monotonic increasing function. Hence it is the zeta function between {{nowrap|''s'' {{=}} {{sfrac|1|2}}}} and {{nowrap|''s'' {{=}} 1}}, and especially the zeta function along the critical line {{nowrap|''s'' {{=}} {{sfrac|1|2}}}}, which is of the most interest. | |||
=== Introduction to Gram points === | |||
As {{nowrap|''s'' > 1}} gets larger, the Dirichlet series for the zeta function is increasingly dominated by the 2 term, getting ever closer to simply {{nowrap|1 + 2<sup>−''z''</sup>}}, which approaches 1 as {{nowrap|''s'' {{=}} Re(''z'')}} becomes larger. When {{nowrap|''s'' ≫ 1}} and ''x'' is an integer, the real part of zeta is approximately {{nowrap|1 + 2<sup>−''s''</sup>}}, and the imaginary part is approximately zero; that is, zeta is approximately real. Starting from {{nowrap|''s'' {{=}} +∞}} with ''x'' an integer, we can trace a line back towards the critical strip on which zeta is real. Since when {{nowrap|''s'' ≫ 1}} the derivative is approximately −{{sfrac|ln(2)|2<sup>''s''</sup>}}, it is negative on this line of real values for zeta, meaning that the real value for zeta increases as ''s'' decreases. The zeta function approaches 1 uniformly as ''s'' increases to infinity, so as ''s'' decreases, the real-valued zeta function along this line of real values continues to increase though all real values from 1 to infinity monotonically. When it crosses the critical line where {{nowrap|''s'' {{=}} {{sfrac|1|2}}}}, it produces a real value of zeta on the critical line. Points on the critical line where {{nowrap|ζ({{frac|1|2}} + ''ig'')}} are real are called "Gram points", after {{w|Jørgen Pedersen Gram}}. We thus have associated pure-octave edos, where ''x'' is an integer, to a value near to the pure octave, at the special sorts of Gram points which corresponds to edos. | |||
=== Gram points and zeta peaks === | |||
Because the value of zeta increased continuously as it made its way from +∞ to the critical line, we might expect the values of zeta at these special Gram points to be relatively large. This would be especially true if −ζ′(''z'') is getting a boost from other small primes as it travels toward the Gram point. A complex formula due to {{w|Bernhard Riemann}} which he failed to publish because it was so nasty becomes a bit simpler when used at a Gram point. It is named the {{w|Riemann–Siegel formula}} since {{w|Carl Ludwig Siegel}} went looking for it and was able to reconstruct it after rooting industriously around in Riemann's unpublished papers. From this formula, it is apparent that when x corresponds to a good edo, the value of {{nowrap|ζ({{frac|1|2}} + ''ig'')}} at the corresponding Gram point should be especially large. | |||
=== The Z function: a mathematically convenient version of zeta === | |||
The absolute value of {{nowrap|ζ{{pars|{{sfrac|1|2}} + ''ig''}}|1.8}} at a Gram point corresponding to an edo is near to a local maximum, but not actually at one. At the local maximum, of course, the partial derivative of {{nowrap|ζ{{pars|{{sfrac|1|2}} + ''it''}}|1.8}} with respect to ''t'' will be zero; however this does not mean its derivative there will be zero. In fact, the {{w|Riemann hypothesis}} is equivalent to the claim that all zeros of {{nowrap|ζ′(''s'' + ''it'')}} occur when {{nowrap|''s'' > {{sfrac|1|2}}}}, which is where all known zeros lie. These do not have values of ''t'' corresponding to good edos. For this and other reasons, it is helpful to have a function which is real for values on the critical line but whose absolute value is the same as that of zeta. This is provided by the {{w|''Z'' function}}, which is defined (in terms of the {{subpage|appendix|u|s=Z function and Riemann-Siegel theta function|text=Riemann-Siegel theta function}}) as: | |||
<math>Z(t) = \exp(i \theta(t)) \zeta\left(\frac{1}{2} + it\right)</math>. | |||
The factor of <math>\exp(i \theta(t))</math> simply modifies zeta by a complex phase, and so the absolute value of Z along the real axis is the same as the absolute value of ζ at the corresponding place on the critical line, and the zeros of Z in this strip correspond one to one with the zeros of ζ in the critical strip, and since θ is holomorphic on the strip with imaginary part between −{{sfrac|1|2}} and {{sfrac|1|2}}, so is Z. And Z is a real even function of the real variable ''t'', since theta was defined so as to give precisely this property. | |||
== Zeta edo lists == | == Zeta edo lists == | ||
Line 364: | Line 352: | ||
==== Zeta peak integer edos ==== | ==== Zeta peak integer edos ==== | ||
Alternatively (as [[groundfault]] has found), if we do not allow octave detuning and instead look at only the record {{nowrap|{{abs|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 not present in the previous list but present here include {{EDOs| 87, 311, 472, 1065, 3566, 4231, 4973, 14124, 30631,}} … and edos present in the previous list but not present here include {{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 53's peak. This definition may be better for measuring how accurate edos are without detuned 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." | Alternatively (as [[groundfault]] has found), if we do not allow octave detuning and instead look at only the record {{nowrap|{{abs|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 not present in the previous list but present here include {{EDOs| 87, 311, 472, 1065, 3566, 4231, 4973, 14124, 30631,}} … and edos present in the previous list but not present here include {{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 53's peak. This definition may be better for measuring how accurate edos are without detuned 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." | ||
==== Absolute zeta peak edos ==== | |||
If we consider that zeta is a measure of relative error (that is, error measured relative to the step size), we realize that plenty of equal temperaments* are excluded simply because, though practically speaking they have great tuning properties, they are not as "efficient" with their number of tones as the last record peak. Arguably what we're interested in is a sequence of edos that generally do increasingly better at tuning JI in terms of lowering the average cent error. Therefore, it suffices to multiply the score by the size of the equal temperament. Surprisingly, the list for ''s'' = 1/2 — which is supposedly where high-limit information is maximized — is ''almost identical'' to the one for ''s'' = 1 — which is the smallest value of ''s'' that we can assume to be meaningful without assuming that the analytic continuation preserves the tuning properties we are interested in — so that we have reassurance from the ''s'' = 1 list that the ''s'' = 1/2 list is meaningful wherever they agree. This is important because surprisingly, the two lists of equal temperament are ''identical up to [[311edo|311et]]'', with only one edo, [[8edo]], omitted from the list for ''s'' = 1. This list is {{EDOs| 1, 2, 3, 4, 5, 7, 9, 10, 12, 14, 15, 17, 19, 22, 24, 26, 27, 31, 34, 41, 46, 53, 58, 65, 68, 72, 84, 87, 94, 99, 111, 118, 130, 140, 152, 171, 183, 198, 212, 217, 224, 243, 270, 311, ... }}. | |||
<nowiki>*</nowiki> Note importantly that we speak of "equal temperaments" rather than "edos" because generally a record peak ''does not'' correspond to an edo, which can have tangible consequences (a significant example is discussed in the next section). | |||
===== Extended list of absolute zeta peak edos ===== | |||
If you look at the graph of zeta (for any zeta graph of interest), another issue quickly becomes evident: many equal temperaments of interest fail to have peaks of record height by only small amounts, so that we intuitively want to include them in a more comprehensive list. However, trying to "fix" this issue quickly leads into another issue: how many "nearly record" edos should we include, and why? The smallest alteration we can make is to allow an equal temperament that does better than the second-best-scoring equal temperament so far. But sometimes we have two very strong equal temperaments appear in quick succession, and given the motivation is to find a more comprehensive list anyways, here we'll include any equal temperament that does better than the third-best-scoring equal temperament so far. The motivation for this cutoff is that you intuitively might expect that the three best equal temperaments found so far represent roughly how good we can do in a given range of step sizes, so that they define what is "normal" for that range, that is, it's the heuristic of the "rule of three". Again, the list for ''s'' = 1/2 is almost identical to ''s'' = 1 for equal temperaments up to 311et, though this time the differences are less trivial: [[176edo|176et]] and [[202edo|202et]] only appear for ''s'' = 1/2, so are put in brackets. The list is {{EDOs| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 21, 22, 24, 26, 27, 29, 31, 34, 36, 38, 39*, 41, 43, 45, 46, 48, 50, 53, 56, 58, 60, 63, 65, 68, 72, 77, 80, 84, 87, 89, 94, 96, 99, 103, 106, 111, 113, 118, 121, 125, 130, 137, 140, 145, 149, 152, 159, 161, 166, 171, (176,) 183, 190, 193, 198, (202,) 212, 217, 224, 229, 239, 243, 248, 255, 270, 277, 282, 289, 301, 311, ... }}. | |||
The equal temperaments added relative to the non-extended list of only things that are records proper are: {{EDOs| 6, 8, 11, 13, 16, 21, 29, 36, 38, 39*, 43, 45, 48, 50, 56, 60, 63, 77, 80, 89, 96, 103, 106, 113, 121, 125, 137, 145, 149, 159, 161, 166, (176,) 190, 193, (202,) 229, 239, 248, 255, 277, 282, 289, 301 }}. * 39et is a notable example because [[39edo]] corresponds to a zeta valley, so it's surprising that it would be included here; the reason that it is included is because this is ''not'' 39edo, but 39 ''equal temperament'', corresponding to a 3.8{{cent}} flat-tempered octave so that it is actually ~39.124edo, that is, it corresponds to the 173rd zeta peak, known by the shorthand 173zpi (where i stands for index). Therefore, this may prove a good testcase for investigating the effects of zeta-based octave-tempering, though given the size of the stretch, the difference is likely to be subtle, but the fact that it "changes zeta's mind" this much is itself interesting. You can also interpret this result differently, which is as evidence that you should not include equal temperaments worse than the third-best-scoring equal temperament so far, given the somewhat dubious inclusion of 39et, however it should be noted that this is more to do with that at the very beginning of the list there aren't many equal temperaments to "beat" so that beating the third-best-scoring equal temperament so far is easy, though arguably this isn't a flaw because people are often more likely to try a smaller equal temperament. It's also perhaps worth noting that 37et almost makes this extended list, but the omission of 37et is much better addressed by no-3's zeta. | |||
==== Zeta integral edos ==== | ==== Zeta integral edos ==== | ||
Line 568: | Line 566: | ||
=== Anti-record edos === | === Anti-record edos === | ||
==== Zeta valley edos ==== | ==== Zeta valley edos ==== | ||
In addition to looking at {{nowrap|{{abs|Z(x)}}}} maxima, we can also look at {{nowrap|{{abs|Z(x)}}}} ''minima'' for integer values of ''x''. These correspond to ''zeta valley edos'', and we get a list of edos {{EDOs| 1, 8, 18, 39, 55, 64, 79, 5941, 8294,}} … | In addition to looking at {{nowrap|{{abs|Z(x)}}}} maxima, we can also look at {{nowrap|{{abs|Z(x)}}}} ''minima'' for integer values of ''x''. These correspond to ''zeta valley edos'', and we get a list of edos {{EDOs| 1, 8, 18, 39, 55, 64, 79, 5941, 8294,}}… Zeta valley EDOs can be thought of as pure-octave tunings that tend to deviate from ''p''-limit JI as much as possible while still preserving octaves, and can serve as "more xenharmonic" tunings. Zeta valley EDOs are only measured with pure octaves, since "tempered-octave zeta valley edos" would simply be any zero of Z(x). Keep in mind, however, that the ''most'' xenharmonic tunings would not contain octaves at all. | ||
Notice that there is a very large jump from [[79edo]] to [[5941edo]]. We know that record {{nowrap|{{abs|Z(x)}}}} scores, both with tempered octaves and pure octaves, grow logarithmically on average. If we assume the scores of integer edos are uniformly distributed on the interval {{nowrap|[0, ''c'' log(''x'')]}}, the probability for the next edo to have a zeta score less than a given small value is also very small, so we would expect valley edos to be rarer than peak edos. So, it would be more productive to find edos which zeta score is simply less than a given threshold. | |||
=== ''k''-ary-peak edos === | === ''k''-ary-peak edos === | ||
Line 620: | Line 616: | ||
{{EDOs| 9, 14, 21, 26, 32, 39, 45, 51, 55, 62, 67, 70, 74, 79, 85, 93, 98, }} … | {{EDOs| 9, 14, 21, 26, 32, 39, 45, 51, 55, 62, 67, 70, 74, 79, 85, 93, 98, }} … | ||
=== Further lists === | |||
See [[The Riemann zeta function and tuning/Record lists|the record lists]]. | |||
== Optimal octave stretch == | == 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. | 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. | ||
For all edos 1 through 100, and for a list of successively higher zeta peaks, taken to five decimal places, see [[table of zeta-stretched edos]]. | |||
=== Zeta peak index === | === Zeta peak index === | ||
These octave-stretched edos are not the only tunings which can be produced from zeta peaks. They are only one type of tuning within a larger family of equal-step tunings called zeta peak | These octave-stretched edos are not the only tunings which can be produced from zeta peaks. They are only one type of tuning within a larger family of equal-step tunings called zeta peak indices. They have their own article here, with a table of the first 500 or so: [[ZPI|zeta peak index (ZPI)]]. | ||
== Removing primes == | == Removing primes == | ||
An [http://mathworld.wolfram.com/EulerProduct.html Euler product] formula for the Riemann zeta function {{subpage|appendix|u|s=Euler product expression for the zeta function|text=can be easily derived}}: | |||
<math>\displaystyle{ | <math>\displaystyle{ | ||
Line 702: | Line 635: | ||
}</math> | }</math> | ||
where the product is over all primes ''p''. The product converges for values of ''s'' with real part greater than | where the product is over all primes ''p''. The product converges for values of ''s'' with real part greater than one, while at {{nowrap|''s'' {{=}} 1}} it diverges to infinity. We may remove a finite list of primes from consideration by multiplying ζ(''s'') by the corresponding factors {{nowrap|(1 − ''p''<sup>−''s''</sup>)}} 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, {{nowrap|(1 − 2<sup>−''s''</sup>)ζ(''s'')}} is now dominated by 3, and the large peak values occur near equal divisions of the "tritave", ie 3. | ||
Along | Along any line of constant <math>\sigma</math>, {{subpage|appendix|u|s=Conversion factor for removing primes|text=it can be shown that}}: | ||
<math>\displaystyle{ | <math>\displaystyle{ | ||
\left| 1 - p^{-\ | \left| 1 - p^{-\sigma - it} \right| = \sqrt{1 + \frac{1}{p^{2\sigma}} - \frac{2 \cos(t \ln p)}{p^\sigma}} | ||
}</math>; | |||
</math> | |||
in particular, on the critical line, | |||
<math>\displaystyle{ | <math>\displaystyle{ | ||
\ | \left| 1 - p^{-\frac{1}{2} - it} \right| = \sqrt{1 + \frac{1}{p} - \frac{2 \cos(t \ln p)}{\sqrt{p}}} | ||
}</math> | }</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. Note that multiplying this factor is technically only accurate for sums whose result is related to the Z function rather than the real part of the zeta function. | |||
For example, if we want to find zeta peak [[EDT]]s (division of the [[3/1|{{ordinal|3}}]] harmonic, or "tritave")—noting that here we must substitute <math>t = \frac{2\pi x}{\ln(3)}</math> instead of <math>\frac{2\pi x}{\ln(2)}</math>—in the no-twos subgroup, our modified Z function is: | |||
<math> | |||
\displaystyle Z\left(\frac{2\pi}{\ln(3)}x\right)\sqrt{\frac{3}{2}-\sqrt{2}\cos\left(\frac{2\pi\ln(2)}{\ln(3)}x\right)} | |||
</math>. | |||
Removing 2 leads to increasing adjusted peak values corresponding to edts into {{EDTs| 4, 7, 9, 13, 15, 17, 26, 32, 39, 56, 69, 75, 88, 131, 245, 316,…}} parts. We can also compare zeta peak EDTs with pure and tempered tritaves just like [[#zeta peak edos|zeta peak]] edos. A striking feature of this list is the appearance not only of [[13edt]], the [[Bohlen–Pierce]] division of the tritave, but the multiples 26 and 39 also. | |||
== Open problems == | == Open problems == | ||
# Are there metrics similar to zeta metrics, but for edos' performance at approximating arbitrary [[delta-rational]] chords? | # Are there metrics similar to zeta metrics, but for edos' performance at approximating arbitrary [[delta-rational]] chords? | ||
== Further information == | |||
* {{subpage|appendix|u|s=Black magic formulas|text=How it can be shown what ETs have a sharp vs. flat tendency}} | |||
* {{subpage|appendix|u|s=Computing zeta|text=How do you actually compute zeta?}} | |||
== Links == | == Links == |