TITLE: Large deviations for discrete uniform distribution
QUESTION [6 upvotes]: (Not sure if this belongs on stack-exchange or overflow; let me know if I should switch it). 
Given a sum of $n$ IID random variables $\{X_i\}_{i=1}^n$, each uniform on the integers $0,1,...,r$ for some (fixed) $r$, I would like to estimate $$ \mathbb{P}[\sum_{i=1}^n X_i = k]$$
for $k$ of order $n$. If $k$ happened to be the mean of the sum, then I know how to handle this via the Local Central Limit Theorem. But, when $k$ is far from the mean of the sum, the error term in the LCLT is larger than the first-order term. 
This seems like it should be a very standard exercise in large-deviations, but I am not very familiar with that field and am having trouble finding the right tool. Could someone help point me to a theorem (and ideally an example calculation) that might help?

REPLY [4 votes]: As Iosif Pinelis mentioned this is quite standard in large deviations theory so let me explain a bit the idea of the theorem he quote.
Let $Y$ a random variable defined as $\mathbb{P}(Y=y)=\frac{1}{Z(\alpha)}e^{-\alpha y}$ for $y=0,\cdots,r$ with $Z(\alpha) = \sum_y e^{-\alpha y}$ and choose $\alpha$ such that $\mathbb{E}(Y)=\frac{k}{n}$. Let $(Y_i)_{i\leq n}$ $n$ independant copy of $Y$. Then  $$\mathbb{P}[\sum_i Y_i =k]$$ can be estimated with the CLT. Moreover we have $$\mathbb{P}[X_1=y_1,X_2=y_2,\cdots,X_n=y_n]=\mathbb{P}[Y_1=y_1,Y_2=y_2,\cdots,Y_n=y_n]\frac{Z(\alpha)^n e^{\alpha \sum_i y_i}}{(r+1)^n}$$ and then $$\mathbb{P}[\sum_i X_i =k] = \Big(\frac{Z(\alpha) }{r+1}\Big)^n e^{\alpha k} \mathbb{P}[\sum_i Y_i =k] $$
which solve your problem.
In order to find $\alpha$ we use that $$\mathbb{E}[Y]=\frac{1}{Z(\alpha)}\sum_{y\leq r}ye^{-\alpha y}=-\frac{d}{d\alpha} \log(Z(\alpha))$$ which gives an easy equation in $\alpha$. Similarly the variance of $Y$ is calculated with the second derivative of $Z(\alpha)$
[To translate with Iosif Pinelis answer : $\alpha=h$, $Z(\alpha)=(r+1)\mathbb{E}[e^{-\alpha X}]=(r+1)R(-\alpha)$]