The quantity y being graphed is related to prime numbers, and the separation of the odd primes into those of the form 4k+1 and those of the form 4k+3.
The non-principal Dirichlet character of period 4 can be defined by:
chi(1) = 1, chi(2) = 0, chi(3) = -1, chi(4) = 0
plus the periodicity condition chi(4+k) = chi(k).
Thus if p == 1 (mod 4) then chi(p) = +1,
whereas if p == 3 (mod 4), then chi(p) = -1.
The psi function is reminiscent of the summatory von Mangoldt function ,
which is also known as the Chebyshev psi function:
< https://en.wikipedia.org/wiki/Chebyshev_function > .
One defines, for the Dirichlet character chi of period 4 mentioned above:
psi(x, chi) := sum_{ q = p^d <= x, p an odd prime, d>=1} chi(q)*log(p)
Thus, odd primes and their powers, generically ‘q’, will contribute to this sum; the sign will depend on chi(q).
I’ve computed and graphed psi(x, chi) for x in the range 3 to 100,000.
I was inspired in this by a report on explicit formulas for primes and Gaussian primes by Daniel Hutama, done under the supervision of Andrew Granville of McGill University.
Hutama’s report is available as Explicit_Formula_Sage.pdf from:
Graph data supplied by PARI/gp, and plotted using MatLab.
y = psi(x, chi), 3<= x <= 100,000 :
