README.md
3.5 kB · markdown
smoothed-novelty
- The novelty meter: the totient sum read through a test function, and the exponent the error carries against the same sum read through a sharp cutoff.
- The object is
S_f(y) = sum_n phi(n) f(ny)forfsupported on[1, 2], main term(6/pi^2) F(2) y^-2withF(s) = int f(u) u^(s-1) du, and the meter isE_f(y) = y^2 S_f(y) - (6/pi^2) F(2)read as a power ofq = y^2. - Three test functions: the indicator of
[1, 2], theC^2bump64 (u-1)^3 (2-u)^3whose Mellin transform is the closed form64 sum_k a_k (2^(s+k) - 1)/(s+k), and theC^infinitybumpexp(4 - 1/((u-1)(2-u)))whose Mellin transform is a 2000-node Gauss-Legendre quadrature. totientssievesphi(n)to3 * 10^7in numpy, dividing each prime out of every multiple and finishing with the one prime factor above the square root; checked against brute-force gcd counts to 2000 and against the Mobius routesum_d mu(d) T(floor(x/d))atx = 10^6, both exact.- The grid is
y = 2^-jforjfrom8to23.5in steps of1/16, 249 samples, the largest window summing the1.19 * 10^7scales between2^23.5and2^24.5. slopesfitslogof the per-octave root mean square ofE_fagainstlog qover all 16 octaves and over the lower and upper 8, an octave being the samples withjin[k, k + 1), 16 of them except the last,[23, 23.5], which holds 9, each placed atj = k + 1/2; it prints each slope with its window and residual, and the least-squares slope over every sample beside it.zeros_from_paricallsgp -qonce for the 138 zeros ofzetato height 300 withzeta(rho - 1)andzeta'(rho)at each, and the explicit formulaE_f(y) = 2 Re sum_rho F(rho) zeta(rho - 1)/zeta'(rho) y^(2 - rho)is compared with the measuredE_fover the whole grid at 1, 10, 30 and 138 zeros; the least-squares power of|c_rho|againstgammaon the 138 zeros is printed for each bump.- The summation noise is printed at the smallest
yas the gap between numpy's pairwise sum andmath.fsumof the same products.
WHAT IT PRINTS
- The per-octave slopes in
q: indicator0.5023(residual0.179; windows0.5296and0.4883, residuals0.161and0.169),C^2bump0.7498(residual0.092; windows0.7553and0.7487),C^infinitybump0.7471(residual0.115; windows0.7474and0.7460). - The explicit formula: with 138 zeros the
C^infinitybump'sE_fis reproduced to a relative2.0e-06over the grid, theC^2bump's to2.3e-04, the gap being the tail of its coefficients, whose printed least-squares power againstgammais-3.22on the 138 zeros; one zero alone gives0.50and0.33. |E_f|/y^(3/2)stays between1.3e-04and0.558for theC^infinitybump against2 sum |c_rho| = 0.755over the same 138 zeros.- The sharp cutoff: the totient error
sum_{n <= x} phi(n) - 3x^2/pi^2jumps byphi(p) - 3(2p - 1)/pi^2across the primep,392073.4atp = 1000003and3920735.7atp = 10000019. - Summation noise at
j = 23.5:5.6e-17against|E_f| = 5.4e-12.
RUN
uv run python research/lab/py/smoothed-novelty/smoothed_novelty.py- From the repository root, one core, 15 seconds: 2 for the sieve, 8 for the 498 smoothed sums, under 1 for PARI. Needs
gpon the path. - Nothing is written to disk.
WITNESSES
stack.md, "The novelty meter": the three slopes with their windows, the explicit formula and its residuals, the jump at a prime.- The Mellin transform of the
C^2bump ats = 2is24/35, printed from the closed form beside the exact value.