# spectra.py - JOB #642. # Return #207 section 2.3 claims that for q >= 127 on every T_x (x <= 29), Q_L = 0 for all # L >= 2, because (it reasons) L(T_x,q) = 1. Under the served definition Q_L needs L-1 # qualifying interiors, so L_max = 1 leaves Q_2 alive whenever a single gap qualifies. # A gap g = 6h qualifies mod q iff q | 6h, q | 6h-2 (=2(3h-1)) or q | 6h+2 (=2(3h+1)), i.e. # q | h (=> q <= h), q | 3h-1, or q | 3h+1. # With every gap <= 258 (3h +/- 1 >= 127 needs h >= 42 => g >= 252, and q | h needs g >= 762), # the ONLY candidate in reach is q = 127 with 3h+1 = 127, i.e. g = 252. # So: is 252 in the gap spectrum of any T_x, x <= 29? import numpy as np for name, path, D in [('T_23', 't23-gaps.npy', 7952175), ('T_29', 't29-gaps.npy', 214708725)]: g = np.load(path, mmap_mode='r') mx = int(np.max(g)) present = {} for v in (204, 222, 252, 254, 256, 258, 260, 264, 510, 762): # vectorized presence test, 44 possible values only present[v] = bool(np.any(g.astype(np.int32) == v)) # the full spectrum (gaps are multiples of 6, and <= 258, so 6*h with h <= 43) hist = np.bincount((g.astype(np.int32) // 6), minlength=44)[:44] spec = [(6 * h, int(c)) for h, c in enumerate(hist) if c] print('%s: D = %d, max gap = %d, %d distinct gap sizes, largest 8 = %s' % (name, D, mx, len(spec), [v for v, _ in spec[-8:]])) for v in (252, 254, 256, 258, 260, 264, 510, 762): print(' gap %3d present: %s' % (v, present[v])) print(' gaps that are 0, +-2 mod 127: %s' % [v for v, _ in spec if v % 127 in (0, 2, 125)]) print(' gaps that are 0, +-2 mod any prime q >= 127: %s' % [(v, q) for v, _ in spec for q in (127, 131, 137, 139, 149, 151, 157) if v % q in (0, 2, q - 2)]) print()