pub fn detect_modular_affine(v: &[i64]) -> Option<GenExpr>
Recognize v[i] = a + b·(i mod p) for a small period p and synthesize the generator.
v[i] = a + b·(i mod p)
p