The following is a small/simple equation to outline this.
a*b+c = d;
a: Each digit value is one less than the preceding digit.
b: Always equal to 9
c: Always decremented by one per line
d: All digits are always 8. Each following line has one more digit than the previous.
Try to take it from here. I'd give you more help, but I'm not sure if you mean that you need to mathematically do the calculations, or if you just need to make a function which outputs the given text.