Using random numbers to evaluate $\sum_{k=1}^{10000}e^{\frac{k}{10000}}$ I tried using the Monte Carlo Method to approximate the sum $\sum_{1}^{10000}e^{\frac{k}{10000}}$.  First I genarating 100 random numbers in (1, 10000). Then by the strong law of large numbers:
$$\sum_{i=1}^{100}\frac{f(U_i)}{k} \to E[f(U)] = \theta$$
where:
$$\theta = \int_{1}^{10000}e^{\frac{x}{10000}}dx$$
The exercise says to use only 100 random numbers. So dont know if that thought is right, because this method requires k→∞

This looks slightly messy to me, in that we are mixing to different approximations: an integral that is (numerically) approximated by a sum, and a integral (or a sum) that is (probabilistically) approximated by a Montecarlo extraction.
There is no need to convert the integral to a (approximate) sum to evaluate it via Montecarlo - and might be confusing to suggest that.
Let's say we want to evaluate
$$I=\int_0^1 e^x dx $$
On one hand, this can be approximated by a finite sum:
$$I= \frac{1}{10000}\int_0^{10000} e^{t/10000}dt\approx \frac{1}{10000} \sum_k e^{k/10000}$$
On the other (rather unrelated) hand, the integral can be evaluated via Montecarlo. Let $Y$ be a random variable uniform in $[0,1]$ Then , letting $u(y)=e^{y}$
$$E[u(Y)]=\int_{0}^1 f_Y(y)\, u(Y) dY = I$$
Then, we can evaluate the integral as an expectation, and so we can throw a large number (say $N=100$) of values of $Y$ and approximate
$$I =E(u(Y)) \approx \frac{1}{N}\sum_{i=1}^N u(Y_i) $$
Notice that this $N$ has no relation with the $10000$ above. To evaluate if this $N$ is big enough, we could try to compute the variance. Anyway, informally, if the variable is not "tricky" (if the densitiy does not varies wildly in the support), 100 (even sometimes 30) is considered a reasonable number for using the law of large numbers.
