stability of negative feedback amplifier
The given formula for the output takes into the account that the signal itself iterates around the feedback loop until the balance is found. In practice one can see with the oscilloscope that the right output does not get stabilized instantneously due the slow operation of the electronic components.

You obviously wanted to do the same iteration which is done in the feedback loop. Unfortunately using discrete steps does not allways lead gradually towards the balance, the iteration can diverge altough the solution exists.The math theory of numerically solving equations is anything but simple.

Just in this case the divergence of the iteration is obvious. You are actually numerically simulating the circuit with an included delay with infinite bandwidth and that naturally makes the systen an oscillator. The amplitude grows infinitely due no limitations. The delay time = your simulation step. You did not mean it, but you included it.

To avoid the implied infinite bandwidth delay you can for example assume some RC lowpass filtering to exist. To get realistic result you should assume one iteration round to present so short time interval that the output of the RC filter does not change very much.