
Papers:
List Papers;
(with Abstracts);
Curriculum (in Italian):
long version ;
short version);
Google Scholar profile.
ResearchGate page.
Orcid ID.
Scopus Author ID.
Thomson Reuters Researcher ID,
Mathematical Reviews page.
Numerical verification of Littlewood's bounds for L(1,χ)
A. Languasco
In this page I collect some links concerning the computation of the
values of L(1,χ), where χ is a Dirichlet character mod q.
In my paper [2] I introduced a fast algorithm
to compute the values of L(1,χ) which is based on a FFT strategy.
I was able to evaluate such functions for every odd prime q up to 10^{7};
using such data we verified, for q in such a range, Littlewood's estimates in [3]
and the LamzouriLiSoundararajan [1] effective bounds.
Previous computations were performed by Shanks [4] in 1973
and WilliamsBroere [5] in 1976.
I describe here the Pari/Gp scripts and the C programs we developed and used to achieve these results.
More detailed instructions on how to use the programs are here:
How_it_works.
I have to state the obvious
fact that if you wish to use some of the softwares below for your own research,
you should acknowledge the author and cite the relevant paper in which the program
was used first. In other words, you can use them but you have to
cite the paper of mine that contains such programs.
If you are wondering why I am stating something so trivial, please have a look at P0 here:
A.LanguascoPrograms
A Code Ocean capsule (able to run an example of use of such a program)
is here:
PARI/Gp scripts
MaxLdirectfinal.gp:
PARI/GP
script. It can be used via
gp2c.
The function to be run is:
maxL_direct (r_{1},r_{2},defaultprecision).
Input: 2< r_{1} < r_{2}, two integers; defaultprecision is the number of digits requested.
Output: the value M_{q} (distinguishing between even and odd characters)
for every odd prime q such that r_{1}≤q≤r_{2} and the running times.
Comment: it uses the lfun command of PARI/Gp and the Conrey
description of Dirichlet characters. Examples on how to use the function
and computational results are collected towards the end of the file.
MaxLloggammafinal.gp:
PARI/GP
script. It can be used via
gp2c.
The function to be run is:
maxL_logGamma (r_{1},r_{2},defaultprecision).
Input: 2< r_{1} < r_{2}, two integers; defaultprecision is the number of digits requested.
Output: the value M_{q} (distinguishing between even and odd characters)
for every odd prime q such that r_{1}≤q≤r_{2} and the running times.
Comments: it computes first the values of log(Γ)
and then obtains m_{q} with a trivial implementation of the sum
over a, 1≤a≤q1. Examples on how to use the function
and computational results are collected towards the end of the file.
MinLdirectfinal.gp:
PARI/GP
script. It can be used via
gp2c.
The function to be run is:
minL_direct (r_{1},r_{2},defaultprecision).
Input: 2< r_{1} < r_{2}, two integers; defaultprecision is the number of digits requested.
Output: the value m_{q} (distinguishing between even and odd characters)
for every odd prime q such that r_{1}≤q≤r_{2} and the running times.
Comment: it uses the lfun command of PARI/Gp and the Conrey
description of Dirichlet characters. Examples on how to use the function
and computational results are collected towards the end of the file.
MinLloggammafinal.gp:
PARI/GP
script. It can be used via
gp2c.
The function to be run is:
minL_logGamma (r_{1},r_{2},defaultprecision).
Input: 2< r_{1} < r_{2}, two integers; defaultprecision is the number of digits requested.
Output: the value m_{q} (distinguishing between even and odd characters)
for every odd prime q such that r_{1}≤q≤r_{2} and the running times.
Comments: it computes first the values of log(Γ)
and then obtains m_{q} with a trivial implementation of the sum
over a, 1≤a≤q1. Examples on how to use the function
and computational results are collected towards the end of the file.
C programs
Examples on how to use the following programs and the results obtained
with them are contained in the directory:
results.
Towards the end of each file are inserted the compilation instructions
for some of the machines used for performing the actual computations.
Programs:
MaxLMinL_main.c:
C program.
input: an odd prime q.
output: the ascii file primroot.res contains q and g, a primitive root mod q.
FFT step:
(using the FFTW library):
All the following programs use the FFTWguru64 interface (which also allows to transform
sequences having dimension larger
than 2^{31}1).
MaxLMinLfftwlinplace.c:
C program.
It computes M_{q} and m_{q} via FFT; it needs the fftw library; it uses the INPLACE transforms
(less RAM but less reliable on small values of q).
It's the long double precision version. Values of log(Γ) are computed
using the internal function of the C programming language.
input: the ascii files primroot.res.
output: the values M_{q} and m_{q} (distinguishing in both cases between even and odd characters) and the running times.
It also detects the characters such that L(1,χ) is minimal/maximal (to understand the notation, see [2], section 2.2).
MaxLMinLfftwloutplace.c:
C program.
It computes M_{q} and m_{q} via FFT; it needs the fftw library; it uses the OUTPLACE transforms
(more RAM but more reliable on small values of q).
It's the long double precision version. Values of log(Γ) are computed
using the internal function of the C programming language.
input: the ascii files primroot.res.
output: the values M_{q} and m_{q} (distinguishing in both cases between even and odd characters) and the running times.
It also detects the characters such that L(1,χ) is minimal/maximal (to understand the notation, see [2], section 2.2).
run_maxLminL.sh:
bash script.
Read a set of odd primes from the ascii file primes.txt; for each of these
primes it runs MaxLMinLfftwlinplace.exe and collects the results in two csv files.
More details are collected in the How_it_works
file.
input: the ascii files primes.txt.
output: the files MaxL.csv, MinL.csv.
Numerical results
The numerical results presented in [2] can be retrieved as follows.
The results for m_{q} and M_{q}
for every prime between 3 and 1000 are contained towards the end
of each gp script.
The results for m_{q} and M_{q}
for every prime between 3 and 10^{7} were obtained with the
C programs (and the FFTW library) on a Dell Optiplex machine
(Intel i57500 processor, 3.40GHz,
16 GB of RAM and running Ubuntu 18.04.5);
they can be found in a csv file here:
results.
The analysis on this file were performed using a python3pandas
script (included here.).
In the directory
plots you can find the scatter
plots of m_{q} and M_{q} for every prime between 3 and 10^{7}.
Proofs of Theorems 12 in [2]
The verification of the inequalities presented in Theorems 12
of [2] uses two python3 scripts on the numerical results previously
mentioned.
They can be downloaded here:
python3pandas scripts.
To verify Theorem 1:
run the script named analysisMaxL.py on the numerical results
contained in MaxLresult.csv; the output file named analysis.txt
contains the information to verify Theorem 1.
To verify Theorem 2:
run the script named analysisMinL.py on the numerical results
contained in MinLresult.csv; the output file named analysis.txt
contains the information to verify Theorem 2.
Algorithms for log(Γ) and psi
In sections 3 and 4 of [2] we described some algorithms to compute log Γ(x) and ψ(x), x ∈ (0,1).
Here we provide their pari/gp implementation.
ale_loggamma.gp:
PARI/GP
script. It can be used via
gp2c.
The function to be run is:
ale_loggamma(x,y).
Input: reads the file primroot.res containing a prime q and g, a primitive
root mod q; x,y are two integers in [0, q2].
Output: a file named precomp_aleloggammaxy.res containing the values
log Γ(a_{k}/q), a_{k}≡ g^{k} mod q,
x ≤ k ≤ y.
Towards the bottom of the file you can find some examples.
ale_loggamma_dif_odd.gp:
PARI/GP
script. It can be used via
gp2c.
The function to be run is:
ale_loggamma_dif_odd(x,y).
As before, but it computes log Γ(a_{k}/q)  log Γ(1  a_{k}/q),
a_{k}≡ g^{k} mod q, x ≤ k ≤ y.
Towards the bottom of the file you can find some examples.
ale_loggamma_dif_even.gp:
PARI/GP
script. It can be used via
gp2c.
The function to be run is:
ale_loggamma_dif_even(x,y).
As before, but it computes log Γ(a_{k}/q) + log Γ(1  a_{k}/q),
a_{k}≡ g^{k} mod q, x ≤ k ≤ y.
Towards the bottom of the file you can find some examples.
ale_psi.gp:
PARI/GP
script. It can be used via
gp2c.
The function to be run is:
ale_psi(x,y).
Input: reads the file primroot.res containing a prime q and g, a primitive
root mod q; x,y are two integers in [0, q2].
Output: a file named precomp_alepsixy.res containing the values
ψ(a_{k}/q), a_{k}≡ g^{k} mod q,
x ≤ k ≤ y.
Towards the bottom of the previous file you can find some examples.
ale_psi_dif_odd.gp:
PARI/GP
script. It can be used via
gp2c.
The function to be run is:
ale_psi_dif_odd(x,y).
As before, but it computes ψ(a_{k}/q)  ψ(1  a_{k}/q),
a_{k}≡ g^{k} mod q, x ≤ k ≤ y.
Towards the bottom of the file you can find some examples.
ale_psi_dif_even.gp:
PARI/GP
script. It can be used via
gp2c.
The function to be run is:
ale_psi_dif_even(x,y).
As before, but it computes ψ(a_{k}/q) + ψ(1  a_{k}/q),
a_{k}≡ g^{k} mod q, x ≤ k ≤ y.
Towards the bottom of the file you can find some examples.
References
Some of the mathematical papers connected with this project are the following.
[1]
Y. Lamzouri, X. Li, K. Soundararajan,
Conditional bounds for the least quadratic nonresidue and related problems, Math. Comp.
84 (2015), 23912412. Corrigendum ibid.,
Math. Comp. 86 (2017), 25512554.
[2] A. Languasco,
Numerical verification of Littlewood's bounds for L(1,χ)
, Journal of Number Theory 223 (2021), 1234.
Code Ocean capsule
[3] J. E. Littlewood, On the class number of the corpus P(sqrt{k}), Proc.
London Math. Soc. 27 (1928), 358372.
[4]
D. Shanks, Systematic Examination of Littlewood's Bounds on L(1,χ), Proc. Sympos.
Pure Math., vol. 24, Amer. Math. Soc., 1973, pp. 267283.
[5]
H.C. Williams, J. Broere, A computational technique for evaluating L(1,χ)
and the class number of a real quadratic field, Math. Comp. 30 (1976), 887893.
Ultimo aggiornamento: 10.12.2021: 15:13:08
