- When x = 1, y = 1/1
- When x = 2, y = 1/1 + 1/2
- When x = 3, y = 1/1 + 1/2 + 2/3
- When x = 4, y = 1/1 + 1/2 + 2/3 + 3/4
- When x = 5, y = 1/1 + 1/2 + 2/3 + 3/4 + 4/5
- When x = 6, y = 1/1 + 1/2 + 2/3 + 3/4 + 4/5 + 5/6
- When x = 7, y = 1/1 + 1/2 + 2/3 + 3/4 + 4/5 + 5/6 + 6/7
- When x = 8, y = 1/1 + 1/2 + 2/3 + 3/4 + 4/5 + 5/6 + 6/7 + 7/8
- When x = 9, y = 1/1 + 1/2 + 2/3 + 3/4 + 4/5 + 5/6 + 6/7 + 7/8 + 8/9
- When x = 10, y = 1/1 + 1/2 + 2/3 + 3/4 + 4/5 + 5/6 + 6/7 + 7/8 + 8/9 + 9/10
Would this list be a function or a sequence, and how would one go about defining it? I plotted it on Desmos and got this:
You can see the pattern : You obtain the second value of $y$ by adding $\frac{1}{2}$. The one after that is obtained by adding $\frac{2}{3}$ to the previous value. And so on each time adding something of the form $\frac{n}{n+1}$.
You can thus define a sequence $x_n$ for $n\geq 1$ by $x_1=1$ and $x_{n+1}:=x_n+\frac{n}{n+1}$. You can check by hand this agrees with the list you provided. You can also prove this sequence can be expressed as $$ x_n= 1+\sum_{k=1}^n \frac{k-1}{k}.$$