Let $K$ be a real quadratic number field, $\mathcal O_K$ its ring of integers and an $\mathfrak a \subset K$ a fractional ideal. I've read in van der Geer that the group $$\operatorname{SL}(\mathcal O_K \oplus \mathfrak a) := \left\{ \begin{pmatrix}a & b \\ c & d\end{pmatrix} \in \operatorname{SL}_2(K) : a,d \in \mathcal O_K, b \in \mathfrak a^{-1}, c \in \mathfrak a \right\}$$ is generated by matricies of the form $$\pm \begin{pmatrix}1 & b \\ 0 & 1\end{pmatrix},\quad \pm \begin{pmatrix}1 & 0 \\ c & 1\end{pmatrix}.$$
So I tried to express \begin{pmatrix}\varepsilon & 0 \\ 0 & \varepsilon^{-1}\end{pmatrix} for $\varepsilon \in \mathcal O_K^\times$ with those matrices and was successful with an approach I developed using four matrices. This approach relied on a condition on the number field and I was not sure if it's always satisfied so I wrote a program to check that. It turned out that in $K=\mathbb Q(\sqrt{146})$ my approach doesn't work (for all squarefree $d<146$ it works in $K=\mathbb Q(\sqrt{d})$).
Can anyone find a decomposition for $\varepsilon = 145 + 12\sqrt{146}$ being the fundamental unit and $\mathfrak a$ being any ideal which is not principal (for example $\mathfrak a:=(5,1+\sqrt{146})$ which is a prime ideal over $5$). By the way, the class number of $K=\mathbb Q(\sqrt{146})$ is $2$.
If you have a general approach this would help me even more.
Edit: A few days after posting this question I could show that there is no way for $d \in \{ 146, 170, 194, 221, 226, 254, 290, 291, 323, 326, 365, 386, 399, 410, 434, 439, 442, 445, 485, 499, 506, 514, 530, 533, 574, 579, 582, 646, 674, 706, 723, 730, 731, 785, 786, 791, 799, 839, 842, 866, 870, 890, 898, 899, 901, 910, 914, 959, 962, 965, 970, 982, 986 \}$ to do it for all units with only four matrices. This is due to how $(\varepsilon \pm 1)$ decomposes into prime ideals (and to which ideal classes they belong). So if van der Geer is right we need here at least five matrices and I'm very curious to see how this works.