Speed up plot of $\sum_{j\ge1} 2^{-j}(1-2^{-j})^{n-1}$

I'm a beginner at Mathematica. I would like to plot the following function:

$${n\over2} \sum_{j\ge1} 2^{-j}(1-2^{-j})^{n-1}$$

However the following code is just too slow:

Plot[n/2 NSum[2^(-j) (1 - 2^(-j))^(n - 1), {j, 1, Infinity}], {n, 1, 100}]


I think it may be trying to expand the $(n-1)$th power symbolically instead of numerically. How can I fix that?

-
You can try giving the following options to Plot, and tweak them until you have a good speed/quality trade-off: PlotPoints -> 10, MaxRecursion -> 3 If you search the site for those options you'll find more in-depth explanations and examples :) – ssch Apr 6 '13 at 14:36

If you know in advance that your sum is already convergent, you can skip the convergence check. Also, it sometimes helps to change the Method used by NSum[]. Here, I use the Shanks transformation as the summation method:

Plot[n/2 NSum[2^(-j) (1 - 2^(-j))^(n - 1), {j, 1, ∞},
Method -> {"WynnEpsilon", Degree -> 2, "ExtraTerms" -> 30},
NSumTerms -> 50, VerifyConvergence -> False], {n, 1, 100},
Frame -> True, PlotRange -> {0.72, 0.724}]


-
Much faster, thanks! – Ricbit Apr 6 '13 at 15:20

This is an approximation, but the result is immediate calculating over the integers:

f[n_] := Sum[2^(-j) (1 - 2^(-j))^(n - 1), {j, 1, Infinity}]

DiscretePlot[n/2 f@n, {n, 1, 101}, Joined -> True, PlotRange -> {0.72, 0.724}]


-