Python verification scripts for the paper "Thinned Wallis-type prime products in residue classes modulo 2^m" Main file: tw_python_verification_fft.py Dependencies: Python 3 mpmath Purpose: The script evaluates the character-sum formula for log K(2^m,S). It uses arbitrary-precision arithmetic and computes Dirichlet L-values via Hurwitz zeta functions and the digamma formula at s=1. For speed, it evaluates all characters modulo 2^m by a radix-2 finite Fourier transform on (Z/2^m Z)^* = {+-1} x <5>. Examples: python tw_python_verification_fft.py --m 4 --S 1 15 --nmax 40 --dps 80 python tw_python_verification_fft.py --m 4 --S 3 11 --nmax 64 --dps 90 python tw_python_verification_fft.py --m 10 --S 1 1023 --nmax 20 --dps 45 Stability check: python tw_python_verification_fft.py --m 4 --S 1 15 --stability --nvals 16 24 32 40 --dps 80 Direct product check, used only for slow consistency checks: python tw_python_verification_fft.py --direct --m 4 --S 3 11 --x 100000000 --dps 40 Notes: The direct products converge much more slowly than the character-sum formula. For the unbalanced example S={3,11} mod 16 the normalized value at x=10^8 is already close to the character-sum value. License suggestion: If these scripts are published with the paper, state an explicit license, for example MIT, BSD-2-Clause, or GPL-3.0. If code is adapted from Languasco's GPL PARI/GP programs, the resulting code should respect the GPL. The present script is an independent Python implementation of the character formula and does not copy PARI/GP source code.