Probability involving sum of natural numbers

Second week into my course on probability and I'm perplexed by this question. I understand that it has to do with the sum of natural numbers and that k varies based on the length of the series that is $x$. I can follow the solution up to a point.

A discrete random variable $X$ has a probability function (pf)

$pX(x) = kx$, $x = 1,2,3,...,2n$

a) Find $k$

The solution I have is

$1 + 2 + 3 +···+ 2n = \frac{2n(2n + 1)}{2}$

$k = \frac{2}{2n(2n + 1)} = \frac{1}{n(2n + 1)}$

The follow up question however has me confused.

b) Determine $P(X \leq n)$

I feel as though I may be missing some intuition about probability functions despite the examples given in the text being fairly straight forward.

Apologies for any obvious blunders as I'm just getting back into math study after a long break.

• $P(X\leq n)=\sum_{x=1}^np_X(x)=\sum_{x=1}^nkx=k\sum_{x=1}^nx=\cdots$ Also you can substitute $k$. – drhab Mar 3 '17 at 11:25

So the probability that $X$ is less than $n$ is therefore the probability that $X$ is $1$ or $2$ or $3$ ... or $n$. You know that the probability that $X$ is $1$ is given by $p_X(1)$, same for probability that $X$ equals $2$ is $p_X(2)$ etc...
Therefore the probability that $X$ is $\leq n$ is $$P(X \leq n) = \sum_{i=1}^n p_X(i)$$ From the first question you know that $p_X(i) = k\cdot i$ with $k$ the constant you calculated. Putting that in the formula above and proceeding the computation gives : $$P(X \leq n) = \sum_{i=1}^n p_X(i) = \sum_{i=1}^n ki = k\sum_{i=1}^n i = k \frac{n(n+1)}{2} = \frac{1}{n(2n+1)} \frac{n(n+1)}{2} = \frac{n+1}{2(2n+1)}$$