Yeah, I'd probably let someone with either Engineering or Arcana make checks for mathematical knowledge, depending on the campaign. Though for esoteric math, I might restrict it to Arcana (on the theory that medieval engineers weren't doing differential equations or calculus to build things).
However, then I think "engineers => masons => Masons => esoteric knowledge => yeah, okay, Engineering might work".