#JavaScript, 48 47 46 bytes
JavaScript, 48 47 46 bytes
Input and output as strings. Returns the nth
term of the sequence.
f=s=>s-(s=s.replace(/(.)\1/g,x=>x/5.5))?f(s):s
- 1 byte saved thanks to Arnauld
- 1 byte saved thanks to tsh