Divisible by 1000003? Easy, just multiply the last digit by 300001 and add!
JavaScript (ES6), 32 25 23 bytes



f=
n=&gt;(3/(n%5*2-5)*n+1)/10
&lt;input type=number min=1 oninput=o.textContent=this.value%5*(this.value%2)?f(this.value):``&gt;&lt;pre id=o&gt;




3/(n%5*2-5) would be written 9/n(mod -10) if I had access to balanced modulo division. Edit: Saved 2 bytes thanks to @EgorSkriptunoff