On a sum involving prime numbers I find myself needing the asymtotics of the following summation for my work. Let $a$ be a positive real number and $p_n$ be the $n$-th prime. 
$$
\sum_{k=1}^{n} [k^a - (k-1)^a]p_k
$$
At $a=1$, this becomes the sum of the first $n$ primes and the asymptotics of this is well known. Moreover it is easy to prove that 
$$
\sum_{k=1}^{n} [k^a - (k-1)^a]p_k = n^a p_n - \int_{2}^{p_n} \pi(x)^a dx.
$$
I want an asymptotic expansion in terms of either $n$ or $p_n$ or a combination of both and get rid of the integration. (Don't ask me how many terms of the asymptotic expansion you want, do your best.)
 A: Nature wants to count the primes up to some cutoff point $x$; when we humans insist on labeling the $n$th prime as the $n$th prime, we are destined to have very large error terms. Here, I don't know that you're going to do much better than just substituting in an asymptotic expression for the $k$th prime, changing the problem immediately to something like
$$
\sum_{k=1}^n [k^a-(k-1)^a] \bigg( k\log k + k\log\log k - k + \frac{k\log\log k - 2k}{\log k} + O\bigg( \frac{k(\log\log k)^2}{\log^2k} \bigg) \bigg),
$$
and then estimating each piece of this sum using regular analysis, divorced from number theory.
A: You can rewrite the sum using prime gap notation.  With $d_k=p_{k+1}-p_k$, the sum becomes
$$ n^ap_n - \sum_{k=1}^{n-1} k^ad_k$$
 and now you can use some knowledge of prime gaps to understand the last sum.  For purposes
of exposition I will ignore the error introduced by pretending $d_1$ is 2 even though it is actually
1.  With this pretense, I can call all of the  $d_k$ even numbers and with high probability assume 
they range from
2 to some small even  number which conjecturally is at most $(\log n)^2$ but potentially at least
$\log {p_n} \log{\log{p_n}}$ : let's call it Fred.  I can then break up the sum into 1/2 Fred-many sums of the
form $2\sum_{k \in A_i}k^a$.  I will let you come up with a careful definition of $A_i$, but $A_1$ should be all the 
integers between 0 and n since  my pretense is that all the $d_k$ are at least 2, $A_2$ will be like $A _1$ but will omit those k for which $d_k$ is exactly 2 and so on.  The first sum of the 1/2 Fred-many  sums is the largest and is readily
computed; cf Bernoulli sums, you should get something of order $n^{a+1}$.  The remaining terms get successively smaller until the sum corresponding to  the maximal
prime gaps is reached.  You may find this perspective handy for your work, unless you derived your sum from 
this kind of expression, in which case, Oops.
Gerhard "Ask Me About System Design" Paseman, 2012.06.19
