convert integer to sympy pattern