# Example of a pattern that generates numbers that slowly round themselves?

So here is my question:

Is there an algorithm that generates a pattern, in which when comparing each subsequent number, every number is a rounded version of the previous number, rounded down 1 place-value.

For example, the pattern generated from this algorithm could be:

1848  185  19  2


Every number after the first number in the pattern is a rounded form of the previous number.

My research online has held no results to such an algorithm that can generate a series of number like this. Do any of you possibly know?

EDIT

In response to a mistake on my question, I am seeking an algorithm in which the numbers generated don't have to be floored. Or modified after being generated.

Optimally the algorithm I am seeking should generate the numbers already in integer form.

Along the same lines as Yujie's answer is (but without explicitly using floor function): $x_{n+1} = (x_n + 5 - (x_n+5 \mod 10))/10$.

Alternatively, since the OP asked for "an algorithm", I'd infer that means more latitude than a recurrence relation. For example an algorithm could be:

$x_{n+1} = \lfloor \frac{x_n + 5}{10} \rfloor$, here the division is integral division (i.e. floor of the divided result).