The Riemann zeta function and tuning: Difference between revisions

ArrowHead294 (talk | contribs)
ArrowHead294 (talk | contribs)
mNo edit summary
Line 26: Line 26:
<math>\displaystyle \xi_\infty(x) = \sum_{\substack{q \geq 2 \\ q \text{ prime}}} \frac{\rround{x \log_2 q}^2}{q^s}</math>
<math>\displaystyle \xi_\infty(x) = \sum_{\substack{q \geq 2 \\ q \text{ prime}}} \frac{\rround{x \log_2 q}^2}{q^s}</math>


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. We can go ahead and include them by adding a factor of 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 [[Wikipedia:Von Mangoldt function|Von Mangoldt function]], an [[Wikipedia:arithmetic function|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 &Lambda;(''n''), and in terms of it we can include prime powers in our error function as
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. 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 [[Wikipedia:Von Mangoldt function|Von Mangoldt function]], an [[Wikipedia:arithmetic function|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 &Lambda;(''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{\rround{x \log_2 n}^2}{n^s}</math>
<math>\displaystyle \xi_\infty(x) = \sum_{n \geq 1} \frac{\Lambda(n)}{\ln n} \frac{\rround{x \log_2 n}^2}{n^s}</math>
Line 53: Line 53:


=== Into the critical strip ===
=== Into the critical strip ===
So long as {{nowrap|''s'' &ge; 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'' &lt; 1}}, particularly in the [http://mathworld.wolfram.com/CriticalStrip.html critical strip], when {{nowrap|0 &lt; ''s'' &lt; 1}}. As s approaches the value {{nowrap|''s'' {{=}} {{frac|1|2}}}} of the [http://mathworld.wolfram.com/CriticalLine.html critical line], the information content, so to speak, 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 &minus; ''s''}} and ''s'' having the same information content. Hence it is the zeta function between {{nowrap|''s'' {{=}} {{frac|1|2}}}} and {{nowrap|''s'' {{=}} 1}}, and especially the zeta function along the critical line {{nowrap|''s'' {{=}} {{frac|1|2}}}}, which is of the most interest.
So long as {{nowrap|''s'' &ge; 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'' &lt; 1}}, particularly in the [http://mathworld.wolfram.com/CriticalStrip.html critical strip], when {{nowrap|0 &lt; ''s'' &lt; 1}}. As s approaches the value {{nowrap|''s'' {{=}} {{sfrac|1|2}}}} of the [http://mathworld.wolfram.com/CriticalLine.html critical line], the information content, so to speak, 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 &minus; ''s''}} and ''s'' having the same information content. 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.


As {{nowrap|''s'' &gt; 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>&minus;''z''</sup>}}, which approaches 1 as {{nowrap|''s'' {{=}} Re(''z'')}} becomes larger. When {{nowrap|''s'' &gt;&gt; 1}} and ''x'' is an integer, the real part of zeta is approximately {{nowrap|1 + 2<sup>&minus;''s''</sup>}}, and the imaginary part is approximately zero; that is, zeta is approximately real. Starting from {{nowrap|''s'' {{=}} +&infin;}} with ''x'' an integer, we can trace a line back towards the critical strip on which zeta is real. Since when {{nowrap|''s'' &gt;&gt; 1}} the derivative is approximately {{nowrap|&minus;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'' {{=}} {{frac|1|2}}}}, it produces a real value of zeta on the critical line. Points on the critical line where {{nowrap|&zeta;({{frac|1|2}} + ''ig'')}} are real are called "Gram points", after [[Wikipedia:Jørgen Pedersen Gram|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.
As {{nowrap|''s'' &gt; 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>&minus;''z''</sup>}}, which approaches 1 as {{nowrap|''s'' {{=}} Re(''z'')}} becomes larger. When {{nowrap|''s'' &gt;&gt; 1}} and ''x'' is an integer, the real part of zeta is approximately {{nowrap|1 + 2<sup>&minus;''s''</sup>}}, and the imaginary part is approximately zero; that is, zeta is approximately real. Starting from {{nowrap|''s'' {{=}} +&infin;}} with ''x'' an integer, we can trace a line back towards the critical strip on which zeta is real. Since when {{nowrap|''s'' &gt;&gt; 1}} the derivative is approximately &minus;{{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|&zeta;({{frac|1|2}} + ''ig'')}} are real are called "Gram points", after [[Wikipedia:Jørgen Pedersen Gram|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.


Because the value of zeta increased continuously as it made its way from +&infin; 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 &minus;&zeta;{{'}}(''z'') is getting a boost from other small primes as it travels toward the Gram point. A complex formula due to [[Wikipedia:Bernhard Riemann|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 [[Wikipedia:Riemann-Siegel formula|Riemann-Siegel formula]] since [[Wikipedia:Carl Ludwig Siegel|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|&zeta;({{frac|1|2}} + ''ig'')}} at the corresponding Gram point should be especially large.
Because the value of zeta increased continuously as it made its way from +&infin; 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 &minus;&zeta;{{'}}(''z'') is getting a boost from other small primes as it travels toward the Gram point. A complex formula due to [[Wikipedia:Bernhard Riemann|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 [[Wikipedia:Riemann-Siegel formula|Riemann-Siegel formula]] since [[Wikipedia:Carl Ludwig Siegel|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|&zeta;({{frac|1|2}} + ''ig'')}} at the corresponding Gram point should be especially large.


=== The Z function ===
=== The Z function ===
The absolute value of {{nowrap|&zeta;({{frac|1|2}} + ''ig'')}} 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|&zeta;({{frac|1|2}} + ''it'')}} with respect to ''t'' will be zero; however this does not mean its derivative there will be zero. In fact, the [[Wikipedia:Riemann hypothesis|Riemann hypothesis]] is equivalent to the claim that all zeros of {{nowrap|&zeta;'(''s'' + ''it'')}} occur when {{nowrap|''s'' &gt; {{frac|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 [[Wikipedia:Z function|Z function]].
The absolute value of {{nowrap|&zeta;({{frac|1|2}} + ''ig'')}} 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|&zeta;({{frac|1|2}} + ''it'')}} with respect to ''t'' will be zero; however this does not mean its derivative there will be zero. In fact, the [[Wikipedia:Riemann hypothesis|Riemann hypothesis]] is equivalent to the claim that all zeros of {{nowrap|&zeta;'(''s'' + ''it'')}} occur when {{nowrap|''s'' &gt; {{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 [[Wikipedia:Z function|Z function]].


In order to define the Z function, we need first to define the [[Wikipedia:Riemann-Siegel theta function|Riemann-Siegel theta function]], and in order to do that, we first need to define the [http://mathworld.wolfram.com/LogGammaFunction.html Log Gamma function]. This is not defined as the natural log of the Gamma function since that has a more complicated branch cut structure; instead, the principal branch of the Log Gamma function is defined as having a branch cut along the negative real axis, and is given by the series
In order to define the Z function, we need first to define the [[Wikipedia:Riemann-Siegel theta function|Riemann&ndash;Siegel theta function]], and in order to do that, we first need to define the [http://mathworld.wolfram.com/LogGammaFunction.html Log Gamma function]. This is not defined as the natural log of the Gamma function since that has a more complicated branch cut structure; instead, the principal branch of the Log Gamma function is defined as having a branch cut along the negative real axis, and is given by the series


<math>\displaystyle\Upsilon(z) = -\gamma z - \ln z + \sum_{k=1}^\infty \frac{z}{k} - \ln\left(1 + \frac{z}{k}\right)</math>
<math>\displaystyle\Upsilon(z) = -\gamma z - \ln z + \sum_{k=1}^\infty \frac{z}{k} - \ln\left(1 + \frac{z}{k}\right)</math>
Line 82: Line 82:
<math>Z(t) = \exp(i \theta(t)) \zeta\left(\frac{1}{2} + it\right)</math>
<math>Z(t) = \exp(i \theta(t)) \zeta\left(\frac{1}{2} + it\right)</math>


Since &theta; is holomorphic on the strip with imaginary part between &minus;{{frac|1|2}} and {{frac|1|2}}, so is Z. Since the exponential function has no zeros, the zeros of Z in this strip correspond one to one with the zeros of &zeta; in the critical strip. Since the exponential of an imaginary argument has absolute value 1, the absolute value of Z along the real axis is the same as the absolute value of &zeta; at the corresponding place on the critical line. And since theta was defined so as to give precisely this property, Z is a real even function of the real variable ''t''.
Since &theta; is holomorphic on the strip with imaginary part between &minus;{{sfrac|1|2}} and {{sfrac|1|2}}, so is Z. Since the exponential function has no zeros, the zeros of Z in this strip correspond one to one with the zeros of &zeta; in the critical strip. Since the exponential of an imaginary argument has absolute value 1, the absolute value of Z along the real axis is the same as the absolute value of &zeta; at the corresponding place on the critical line. And since theta was defined so as to give precisely this property, Z is a real even function of the real variable ''t''.


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'' {{=}} {{frac|2&pi;''x''|ln(2)}}}}, 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].
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&pi;|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 [[Wikipedia:Mathematica|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({{frac|2&pi;''x''|ln(2)}}) in the region around 12edo:
If you have access to [[Wikipedia:Mathematica|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({{frac|2&pi;''x''|ln(2)}}) in the region around 12edo:
Line 96: Line 96:
[[File:plot270.png|alt=plot270.png|plot270.png]]
[[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'' {{=}} {{frac|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 {{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.


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 &gt; 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'''".
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 &gt; 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'''".
Line 115: Line 115:
\zeta(s) = \sum_n n^{-s}</math>
\zeta(s) = \sum_n n^{-s}</math>


Now let's do two things: we're going to expand {{nowrap|''s'' {{=}} &sigma; + ''it''}}, and we're going to multiply &zeta;(s) by its conjugate &zeta;(''s''){{'}}, noting that {{nowrap|&zeta;(''s''){{'}} {{=}} &zeta;(''s''{{'}})}} and {{nowrap|&zeta;(''s'') · &zeta;(''s''){{'}} {{=}} &zeta;(''s'')<sup>2</sup>}}. We get:
Now let's do two things: we're going to expand {{nowrap|''s'' {{=}} &sigma; + ''it''}}, and we're going to multiply &zeta;(s) by its conjugate &zeta;(''s''){{'}}, noting that {{nowrap|&zeta;(''s''){{'}} {{=}} &zeta;(''s''{{'}})}} and {{nowrap|&zeta;(''s'') &#8901; &zeta;(''s''){{'}} {{=}} &zeta;(''s'')<sup>2</sup>}}. We get:


<math> \displaystyle
<math> \displaystyle
Line 136: Line 136:
where the last equality makes use of the fact that {{nowrap|cos(&minus;''x'') {{=}} cos(''x'')}} and {{nowrap|sin(&minus;''x'') {{=}} &minus;sin(''x'')}}.
where the last equality makes use of the fact that {{nowrap|cos(&minus;''x'') {{=}} cos(''x'')}} and {{nowrap|sin(&minus;''x'') {{=}} &minus;sin(''x'')}}.


Now, let's decompose the sum into three parts: {{nowrap|''n'' {{=}} ''d''}}, {{nowrap|''n'' &gt; ''d''}}, and {{nowrap|''n'' &lt; ''d''}}. Here's what we get:
Now, let's decompose the sum into three parts: {{nowrap|''n'' {{=}} ''d''|''n'' &gt; ''d''|and ''n'' &lt; ''d''}}. Here's what we get:


<math> \displaystyle
<math> \displaystyle
Line 145: Line 145:
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(''n''/''d'') {{=}} 0}}. Since {{nowrap|sin(0) {{=}} 0}}, the sin term in the numerator cancels out, yielding:
First, in the leftmost summation, we can see that {{nowrap|''n'' {{=}} ''d''}} implies {{nowrap|ln({{frac|''n''|''d''}}) {{=}} 0}}. Since {{nowrap|sin(0) {{=}} 0}}, the sin term in the numerator cancels out, yielding:


<math> \displaystyle
<math> \displaystyle
Line 160: Line 160:
\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(''p'' / ''q'') {{=}} &minus;ln(''q'' / ''p'')}} and that sin is an odd function, we can see that the sin terms cancel out, leaving
Now, noting that {{nowrap|ln({{frac|''p''|''q''}}) {{=}} &minus;ln({{frac|''q''|''p''}})}} and that sin is an odd function, we can see that the sin terms cancel out, leaving


<math> \displaystyle
<math> \displaystyle
Line 178: Line 178:
\abs{ \zeta(s) }^2 = \sum_{n,d} \frac{\cos\left(t \ln\left({\tfrac{n}{d}}\right)\right)}{(nd)^{\sigma}}</math>
\abs{ \zeta(s) }^2 = \sum_{n,d} \frac{\cos\left(t \ln\left({\tfrac{n}{d}}\right)\right)}{(nd)^{\sigma}}</math>


Finally, by making the mysterious substitution {{nowrap|''t'' {{=}} {{frac|2&pi;|ln(2)}} ''x''}}, the musical implications of the above will start to reveal themselves:
Finally, by making the mysterious substitution {{nowrap|''t'' {{=}} {{sfrac|2&pi;|ln(2)}} ''x''}}, the musical implications of the above will start to reveal themselves:


<math> \displaystyle
<math> \displaystyle
Line 186: Line 186:


=== 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|2&pi; log<sub>2</sub>(''n''/''d'')}}. This cosine peaks at {{nowrap|''x'' {{=}} ''N''/log<sub>2</sub>(''n''/''d'')}} for all integers ''N'', or in other words, the Nth-equal division of the rational number ''n''/''d'', and hits troughs midway between.
For every strictly positive rational ''n''/''d'', there is a cosine with period {{nowrap|2&pi; log<sub>2</sub>({{frac|''n''|''d''}})}}. 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&pi;</sup> &#8776; 535.49}}, or what [[Keenan_Pepper|Keenan Pepper]] has called the "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&pi;</sup> &#8776; 535.49}}, or what [[Keenan_Pepper|Keenan Pepper]] has called the "natural interval.")
Line 229: Line 229:
Note that since there's no restriction that n and d be coprime, the "rationals" we're using here don't have to be reduced. So this shows that zeta yields an error metric over all unreduced rationals, but leaves open the question of how reduced rationals are handled. It turns out that the same function also measures the error of reduced rationals, scaled only by a rolloff-dependent constant factor across all EDOs.
Note that since there's no restriction that n and d be coprime, the "rationals" we're using here don't have to be reduced. So this shows that zeta yields an error metric over all unreduced rationals, but leaves open the question of how reduced rationals are handled. It turns out that the same function also measures the error of reduced rationals, scaled only by a rolloff-dependent constant factor across all EDOs.


To see this, let's first note that every "unreduced" rational n/d can be decomposed into the product of a reduced rational ''n''{{'}}/''d''{{'}} and a common factor c/c. Furthermore, note that for any reduced rational ''n''{{'}}/''d''{{'}}, we can generate all unreduced rationals ''n''/''d'' corresponding to it by multiplying it by all such common factors ''c''/''c'', where ''c'' is a strictly positive natural number.
To see this, let's first note that every "unreduced" rational {{sfrac|''n''|''d''}} can be decomposed into the product of a reduced rational {{sfrac|''n''{{'}}|''d''{{'}}}} and a common factor {{sfrac|''c''|''c''}}. Furthermore, note that for any reduced rational {{sfrac|''n''{{'}}|''d''{{'}}}}, we can generate all unreduced rationals {{sfrac|''n''|''d''}} corresponding to it by multiplying it by all such common factors {{sfrac|''c''|''c''}}, where ''c'' is a strictly positive natural number.


This allows us to change our original summation so that it's over three variables, ''n''{{'}}, ''d''{{'}}, and ''c''{{'}}, where ''n''{{'}} and ''d''{{'}} are coprime, and ''c'' is a strictly positive natural number:
This allows us to change our original summation so that it's over three variables, ''n''{{'}}, ''d''{{'}}, and ''c''{{'}}, where ''n''{{'}} and ''d''{{'}} are coprime, and ''c'' is a strictly positive natural number:
Line 236: Line 236:
\abs{ \zeta(s) }^2 = \sum_{n',d',c} \frac{\cos\left(t \ln\left({\tfrac{cn'}{cd'}}\right)\right)}{(cn' \cdot cd')^{\sigma}}</math>
\abs{ \zeta(s) }^2 = \sum_{n',d',c} \frac{\cos\left(t \ln\left({\tfrac{cn'}{cd'}}\right)\right)}{(cn' \cdot cd')^{\sigma}}</math>


Now, the common factor ''c''/''c'' cancels out inside the log in the numerator. However, in the denominator, we get an extra factor of ''c''<sup>2</sup> to contend with. This yields
Now, the common factor {{sfrac|''c''|''c''}} cancels out inside the log in the numerator. However, in the denominator, we get an extra factor of ''c''<sup>2</sup> to contend with. This yields


<math> \displaystyle
<math> \displaystyle
Line 530: Line 530:
We may define ''local zeta'' edos as a generalization of the ''zeta peak'' and ''zeta peak integer'' EDOs as those that do not necessarily have successively higher zeta peaks but simply have a higher zeta peak than the edos on either side of them. This is a helpful list for finding EDOs that approximate primes well (but are not necessarily the best at doing so) for their size, or for finding EDOs in size ranges that lack any record-holding zeta edos (e.g. between 60 and 70 tones).
We may define ''local zeta'' edos as a generalization of the ''zeta peak'' and ''zeta peak integer'' EDOs as those that do not necessarily have successively higher zeta peaks but simply have a higher zeta peak than the edos on either side of them. This is a helpful list for finding EDOs that approximate primes well (but are not necessarily the best at doing so) for their size, or for finding EDOs in size ranges that lack any record-holding zeta edos (e.g. between 60 and 70 tones).


{{EDOs| 5, 7, 10, 12, 15, 17, 19, 22, 24, 27, 29, 31, 34, 36, 38, 41, 43, 46, 48, 50, 53, 56, 58, 60, 63, 65, 68, 72, 75, 77, 80, 82, 84, 87, 89, 91, 94, 96, 99,}} …
{{EDOs|5, 7, 10, 12, 15, 17, 19, 22, 24, 27, 29, 31, 34, 36, 38, 41, 43, 46, 48, 50, 53, 56, 58, 60, 63, 65, 68, 72, 75, 77, 80, 82, 84, 87, 89, 91, 94, 96, 99,}} …


==== Local anti-zeta edos ====
==== Local anti-zeta edos ====
We may define ''anti-zeta'' edos as the opposite of zeta peak and local zeta edos (i.e. those with a ''lower'' zeta peak than the edos on either side of them). This is helpful for finding edos that force the use of methods other than traditional concordant harmony, or for composers seeking a challenge to inspire creativity.
We may define ''anti-zeta'' edos as the opposite of zeta peak and local zeta edos (i.e. those with a ''lower'' zeta peak than the edos on either side of them). This is helpful for finding edos that force the use of methods other than traditional concordant harmony, or for composers seeking a challenge to inspire creativity.


{{EDOs| 6, 8, 11, 13, 16, 18, 20, 23, 25, 28, 30, 33, 35, 37, 40, 42, 44, 47, 49, 52, 54, 57, 59, 61, 64, 66, 69, 71, 73, 76, 78, 81, 83, 86, 88, 90, 92, 95, 97,}} …
{{EDOs|6, 8, 11, 13, 16, 18, 20, 23, 25, 28, 30, 33, 35, 37, 40, 42, 44, 47, 49, 52, 54, 57, 59, 61, 64, 66, 69, 71, 73, 76, 78, 81, 83, 86, 88, 90, 92, 95, 97,}} …


==== Indecisive edos ====
==== Indecisive edos ====
Finally, ''indecisive'' edos can be defined as edos which are neither local zeta, nor anti-zeta. These tunings are more restrictive than local zeta edos, but not as far off the deep end as anti-zeta edos. They might narrow down the range of compositional choices available so as to be not so many to promote indecision, but not so few as to promote frustration.
Finally, ''indecisive'' edos can be defined as edos which are neither local zeta, nor anti-zeta. These tunings are more restrictive than local zeta edos, but not as far off the deep end as anti-zeta edos. They might narrow down the range of compositional choices available so as to be not so many to promote indecision, but not so few as to promote frustration.


{{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,}} …


== Optimal octave stretch ==
== Optimal octave stretch ==
Line 642: Line 642:
}</math>
}</math>


From this we may deduce that {{nowrap|{{sfrac|&theta;(''t'')|&pi;}} &#8776; ''r'' ln(''r'') &minus; ''r'' &minus; 1/8}}, where {{nowrap|''r'' {{=}} ''t'' / (2&pi;) {{=}} ''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'', which is {{nowrap|{{sfrac|1200|ln(2)}} {{=}} 1731.234{{c}}}}.
From this we may deduce that {{nowrap|{{sfrac|&theta;(''t'')|&pi;}} &#8776; ''r'' ln(''r'') &minus; ''r'' &minus; {{sfrac|1|8}}}}, where {{nowrap|''r'' {{=}} {{sfrac|''t''|2&pi;}} {{=}} {{sfrac|''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'', which is {{nowrap|{{sfrac|1200|ln(2)}} {{=}} 1731.234{{c}}}}.


Recall that Gram points near to pure-octave edos, where ''x'' is an integer, can be expected to correspond to peak values of {{nowrap|{{!}}&zeta;{{!}} {{=}} {{!}}Z{{!}}}}. We can find these Gram points by Newton's method applied to the above formula. If {{nowrap|''r'' {{=}} ''x''/ln(2)}}, and if {{nowrap|''n'' {{=}} &lfloor;''r'' ln(''r'') &minus; ''r'' + {{frac|3|8}}&rfloor;}} is the nearest integer to {{sfrac|&theta;(2&pi;''r'')|&pi;}}, then we may set {{nowrap|''r''<sup>+</sup> {{=}} {{sfrac|''r'' + ''n'' + {{frac|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.
Recall that Gram points near to pure-octave edos, where ''x'' is an integer, can be expected to correspond to peak values of {{nowrap|{{!}}&zeta;{{!}} {{=}} {{!}}Z{{!}}}}. We can find these Gram points by Newton's method applied to the above formula. If {{nowrap|''r'' {{=}} {{sfrac|''x''|ln(2)}}}}, and if {{nowrap|''n'' {{=}} &lfloor;''r'' ln(''r'') &minus; ''r'' + {{sfrac|3|8}}&rfloor;}} is the nearest integer to {{sfrac|&theta;(2&pi;''r'')|&pi;}}, then we may set {{nowrap|''r''<sup>+</sup> {{=}} {{sfrac|''r'' + ''n'' + {{sfrac|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 {{nowrap|''x'' {{=}} 12}}, so that {{nowrap|''r'' {{=}} 12/ln(2) {{=}} 17.312}}. Then {{nowrap|''r'' ln(''r'') &minus; ''r'' &minus; 1/8 {{=}} 31.927}}, which rounded to the nearest integer is 32, so {{nowrap|''n'' {{=}} 32}}. Then {{nowrap|{{sfrac|''r'' + ''n'' + {{frac|1|8}}|ln(''r'')}} {{=}} 17.338}}, corresponding to {{nowrap|''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.
For an example, consider {{nowrap|''x'' {{=}} 12}}, so that {{nowrap|''r'' {{=}} {{sfrac|12|ln(2)}} {{=}} 17.312}}. Then {{nowrap|''r'' ln(''r'') &minus; ''r'' &minus; {{sfrac|1|8}} {{=}} 31.927}}, which rounded to the nearest integer is 32, so {{nowrap|''n'' {{=}} 32}}. Then {{nowrap|{{sfrac|''r'' + ''n'' + {{sfrac|1|8}}|ln(''r'')}} {{=}} 17.338}}, corresponding to {{nowrap|''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 {{nowrap|&theta;(2&pi;''r'') / &pi;}}, which was 31.927. Then {{nowrap|32 &minus; 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 {{nowrap|&lfloor;''r'' ln(''r'') &minus; ''r'' + 3/8&rfloor; &minus; ''r'' ln(''r'') + ''r'' + 1/8}}, where {{nowrap|''r'' {{=}} {{sfrac|''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.
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 {{nowrap|&theta;(2&pi;''r'') / &pi;}}, which was 31.927. Then {{nowrap|32 &minus; 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 {{nowrap|&lfloor;''r'' ln(''r'') &minus; ''r'' + {{sfrac|3|8}}&rfloor; &minus; ''r'' ln(''r'') + ''r'' + {{sfrac|1|8}}}}, where {{nowrap|''r'' {{=}} {{sfrac|''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 ==
== Computing zeta ==