Modulo (2n+1) arithmetic logic