You're approximating
[tex]\displaystyle\int_1^5 x^2\,\mathrm dx[/tex]
with a Riemann sum, which comes in the form
[tex]\displaystyle\int_a^b f(x)\,\mathrm dx=\lim_{n\to\infty}\sum_{i=1}^nf(x_i)\Delta x_i[/tex]
where [tex]x_i[/tex] are sample points chosen according to some decided-upon rule, and [tex]\Delta x_i[/tex] is the distance between adjacent sample points in the interval.
The simplest way of approximating the definite integral is by partitioning the interval into equally-spaced subintervals, in which case [tex]\Delta x=\dfrac{b-a}n[/tex], and since [tex][a,b]=[1,5][/tex], we have
[tex]\Delta x=\dfrac{5-1}n=\dfrac4n[/tex]
Using the right-endpoint method, we approximate the area under [tex]f(x)[/tex] with rectangles whose heights are determined by their right endpoints. These endpoints are chosen by successively adding the subinterval length to the starting point of the interval of integration.
So if we had [tex]n=4[/tex] subintervals, we'd split up the interval of integration as
[tex][1,5]=[1,2]\cup[2,3]\cup[3,4]\cup[4,5][/tex]
Note that the right endpoints follow a precise pattern of
[tex]2=1+\dfrac44[/tex]
[tex]3=1+\dfrac84[/tex]
[tex]4=1+\dfrac{12}4[/tex]
[tex]5=1+\dfrac{16}4[/tex]
The height of each rectangle is then given by the values above getting squared (since [tex]f(x)=x^2[/tex]). So continuing with the example of [tex]n=4[/tex], the Riemann sum would be
[tex]\displaystyle\sum_{i=1}^4\left(1+\dfrac{4i}4\right)^2\dfrac44[/tex]
For [tex]n=5[/tex],
[tex]\displaystyle\sum_{i=1}^5\left(1+\dfrac{4i}5\right)^2\dfrac45[/tex]
and so on, so that the definite integral is given exactly by the infinite sum
[tex]\displaystyle\lim_{n\to\infty}\sum_{i=1}^n\left(1+\dfrac{4i}n\right)^2\dfrac4n[/tex]