back to table · edit · history · where entries came from · files · download
3122 bytes, as of the version from 2026-11-27 09:56 (current). Recorded here, not run.
"""Reproduce T813: Parabolic Riley polynomials of 2-bridge knots.
Requires SageMath (tested with 10.9) and numberdb (tested with 0.1.10).
sage -pip install numberdb
sage -python generate.py # verify all stored entries; no writes
sage -python generate.py --publish # fill the existing draft, additively
Configure your own NUMBERDB_API_KEY for a private draft. Uploads also require
session NUMBERDB_ENGINE, NUMBERDB_MODEL and NUMBERDB_RUN_ID; none is embedded
here. A --publish upload writes entries, not publication or a review offer.
The natural domain is odd p>=3, positive odd q<p, gcd(p,q)=1. The default
selection exhausts p<=51, all such q, in increasing p then q. Extend with
RileyGenerator().publish(limit=...). No entries outside the supplied range
are removed. All factors and distinct presentation identities are retained.
For epsilon_j=(-1)^floor(j*q/p), n=(p-1)/2, set e_j=epsilon_(n+1-j).
The source's symmetric word is (e_n,...,e_1,e_1,...,e_n). The scalar recurrence
below specializes lambda=tilde-lambda=x in Jo and Kim, arXiv:2601.17433v1,
Example 6.5 and Corollary 6.6. This returns W_11 for the parabolic matrices
A=[[1,1],[0,1]], B=[[1,0],[x,1]], as defined in arXiv:2201.03922v2, section 2.
Exact ZZ[x] arithmetic is used throughout; digits is irrelevant to exact data.
The attached independent_check.py uses literal word matrices and a continuant
determinant, not this recurrence. argument-selection.md explains the bounds.
"""
import argparse
import os
from math import gcd
import numberdb.sage as numberdb
from sage.rings.integer_ring import ZZ
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
P = PolynomialRing(ZZ, 'x')
x = P.gen()
def riley(p, q):
p, q = int(p), int(q)
if p < 3 or p % 2 != 1 or q <= 0 or q >= p or q % 2 != 1 or gcd(p, q) != 1:
raise ValueError('Expected odd p>=3, odd 0<q<p, gcd(p,q)=1')
n = (p - 1) // 2
e = [ZZ(1 if ((j * q) // p) % 2 == 0 else -1)
for j in range(n, 0, -1)]
f = [P.one(), x + 1]
if n >= 2:
f.append(x*x + (3 if e[0] == e[1] else -1)*x + 1)
for j in range(3, n + 1):
if e[j-2] == e[j-1]:
f.append((x+1)*(f[-1]+f[-2])-f[-3])
else:
f.append((x-1)*(f[-1]-f[-2])+f[-3])
return f[n]
class RileyGenerator(numberdb.Generator):
table = 'T813'
parameters = ['p', 'q']
type = 'Z[]'
digits = 100
rigour = 'exact'
def enumerate(self, limit=51):
for p in range(3, int(limit)+1, 2):
for q in range(1, p, 2):
if gcd(p, q) == 1:
yield {'p': p, 'q': q}
def value(self, params, digits):
return riley(params['p'], params['q'])
if __name__ == '__main__':
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--publish', action='store_true')
args = parser.parse_args()
generator = RileyGenerator()
if args.publish:
print(generator.publish(message=os.environ.get('NUMBERDB_EDIT_MESSAGE', ''), removing=False))
else:
print(generator.verify(sample=None))