Let $b,n$ be given positive integers. I would like to give some formula for the multiplicative inverse $a^*$ of a positive integer $a$ to a modulo of the form $4ab-n$, where $(a,n)=1$, i.e.
$$ aa^*\equiv1(\mod 4ab-n) $$
If $n=1$ it is easily seen that $a^*=4b$, but I could not find a simple formula in general.
Thanks!
If it were possible we'd get a general formula for $\,a^{-1}\pmod n,\,$ since by Bezout
$$ 1\, =\, i(4ab-n) + j a\, =\, a(4ib+j) - i n$$
Therefore $\ j\equiv a^{-1}\pmod{4ab-n}\ \Rightarrow\ j+4ib\equiv a^{-1}\pmod n$
Remark $\ $ Generally this yields $\, a^{-1}\!\!\pmod{\! n}\,$ from $\,a^{-1}\!\!\pmod{\!kn +\, \ell a}$