# Optimal presentation of discrete double inequality

I have the double inequality $$G(n) = \left( \frac{1}{2} \right)^{\omega(n)} \tau(n)^2 < F(n) \leq \left( \frac{3}{4} \right)^{\omega(n)} \tau(n)^2 = H(n),$$ where $$F(n) = \sum_{d \mid n} \tau(d)$$. (What $$\omega$$ and $$\tau$$ are can be inferred from the code below.)

The question I have (which might be not appropriate) is: what might be a good way to plot this double inequality? Any suggestions would be appreciated.

My best idea at present is to plot the two ratios $$F(n)/G(n)$$ and $$H(n)/F(n)$$ so that it can be seen from the plot that they both stay above $$1$$. The code I am using:

F[n_] := DivisorSum[n, DivisorSigma[0, #] &]

PlotLabels -> Automatic]


• Building off of that, I think it's nice to put $F(n)$ in the denominator each time, and shift the origin of the axes to {0,1}. Then the one bigger than $F(n)$ is above the axis, and the one smaller than $F(n)$ is below it: DiscretePlot[{(3/4)^(PrimeNu[n])*(DivisorSigma[0, n])^2/F[n], ((1/2)^(PrimeNu[n])*(DivisorSigma[0, n])^2)/F[n]}, {n, 2,400}, PlotLabels -> Automatic, AxesOrigin -> {0, 1}] Mar 12, 2021 at 2:26
• Another similar way is to not shift the axes origin, and use - instead of /, but then you'd also want a PlotRange -> Full, and the graph of that is a bit wilder, but they're more similar to each other. You also probably want to get rid of the x axis markers in this case. DiscretePlot[{(3/4)^(PrimeNu[n])*(DivisorSigma[0, n])^2 - F[n], ((1/2)^(PrimeNu[n])*(DivisorSigma[0, n])^2) - F[n]}, {n, 2, 400}, PlotLabels -> Automatic, PlotRange -> Full, Ticks -> {False, Automatic}] Mar 12, 2021 at 2:29
• I haven't yet tried the second suggestion, but the first one already makes the plot much better. Mar 12, 2021 at 2:55
• Feel free to post an answer by the way. Mar 12, 2021 at 3:14
• Ok, posted these comments as an answer! Mar 12, 2021 at 6:18

A variation on thorimur's second method: We can use custom ticks for the vertical axis and put a gap between the two curves to have the horizontal axis visible:

ClearAll[g, h, F]
F[n_] := DivisorSum[n, DivisorSigma[0, #] &]

gap = 20;
vticks = Join[ChartingFindTicks[{-100 - gap/2, -gap/2}, {100, 0}][-100-gap/2, -gap/2],
ChartingFindTicks[{gap/2, 100 + gap/2}, {0, 100}][gap, 100 + gap/2]];

DiscretePlot[{gap/2 + h[n] - F[n], g[n] - F[n] - gap/2}, {n, 2, 400},
Filling -> {1 -> gap/2, 2 -> -gap/2},
Ticks -> {Automatic, vticks},
PlotLegends -> {HoldForm[F[n] - g[n]], HoldForm[h[n] - F[n]]},
ImageSize -> Large, PlotRange -> {-100, 100},
GridLines -> {None, {-gap/2, gap/2}}]


Building off of what you have, I think it's nice to put $$F(n)$$ in the denominator each time, and shift the origin of the axes to {0,1}. Then the one bigger than $$F(n)$$ is above the axis, and the one smaller than $$F(n)$$ is below it:

DiscretePlot[{(3/4)^(PrimeNu[n])*(DivisorSigma[0, n])^2/F[n],

Another similar way is to use - instead of /, and keep the axis where it is originally. In this case you'd also want PlotRange -> Full; the graph of this is a bit wilder, but not as lopsided from top to bottom. You'd also probably want to get rid of the x-axis markers in this case, as they overlap with the curves:
DiscretePlot[{(3/4)^(PrimeNu[n])*(DivisorSigma[0, n])^2 - F[n],