I am interested in the following sum $$\sum_{i=1}^{\infty} i q^i$$ for some $q&lt;1$.   Is there a closed-form-term for this? If yes, how does one derive this?  I am also interested in   $\sum_{i=x}^{\infty} i q^i$  for some $x&gt;1$.
How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$
Iterate a list with indexes in Python I could swear I've seen the function (or method) that takes a list, like this [3, 7, 19] and makes it into iterable list of tuples, like so: [(0,3), (1,7), (2,19)] to use it instead of:  for i in range(len(name_of_list)):     name_of_list[i] = something   but I can't remember the name and googling "iterate list" gets nothing. The identity cannot be a commutator in a Banach algebra? The Wikipedia article on  claims, without a proof or reference, that there does not exist a (unital) Banach algebra $B$ and elements $x, y \in B$ such that $xy - yx = 1$. This is surprising to me, but maybe the proof is straightforward; anyone have a proof and/or a reference?   More generally, I would have naively thought that I could embed any ring into a Banach algebra. I guess there are actually serious restrictions to doing this; are these issues discussed anywhere? I want to copy/modify/delete a Minecraft world. Where can I find my saves folder? Every time I call \section{**Section Name**}, a number appears to the left of the name of the section.  How do I hide this number? Which equals operator (== vs ===) should be used in JavaScript comparisons? Why are American-style options worth more than European-style options? Why are American-style options worth more than European-style options?   I realize I can exercise American-style options anytime before the  expire, but I can only exercise European-style options during their  "exercise period" (usually right when they expire, but no earlier).   So it makes sense that an American option is worth at least as much as  a European option.   But why is it worth more? If I exercise my American option early, I  may make more money than waiting until expiration, but I also may make  less. Mathematically, there's no advantage, since I'm equally likely  to make as much money by waiting for expiration.   Mathematically speaking, is there ever a good reason to exercise an  American option early?   I realize people don't always behave logically, but even the formulas  that valuate options show that American options are worth more.   EDIT (answering comments):    Many of the comments people made would apply to lookback options  (), but not to American  options.  American options can do everything European options can and more. I  understand that, and that means American options can't be worth any  LESS than European options, but I'm still not clear on how you would  mathematically calculate this extra value.  @Aaronaught: "The difference between an American and European  option is the difference between getting N chances to get it right (N  being the number of days 'til expiration) and getting just one  chance. It should be easy to see why you're more likely to profit  with the former, even if you can't accurately predict price  movement."    REPLY: I don't think you really get N chances. Once you exercise the  option, that's it, no more chances. And, if you decide not to exercise  the option today, and the underlying's price falls, you can't go back  in time and exercise it yesterday.    @jdsweet: Think of it this way, if you traveled back through time  one month - with perfect knowledge of AAPL's stock price over that  period - which happens to peak viciously then return to its old price  at the end of the period - wouldn't you pay more for an American  option?    REPLY: Well, no. I'd simply buy a cheaper European option that expires  right at the spike. Or, I'd buy a European option that expires later,  and sell it when the spike occurs. American options don't give you  precognition, so you're still guessing as to when to sell/exercise.    @jdsweet: "one of the more common reasons people exercise (as  opposed to sell) an American option before expiration is if an  unexpected dividend (larger than remaining time value of the option)  was just announced that's going to be paid before the option contract  expires"    REPLY: This makes sense. I'm actually trading FOREX options, so there  is no dividend. In that scenario, are European and American options  worth the same? Add existing ssh key for git How can I get exactly 5 logarithmic divisions of an interval? Bug in time of expiring bounty Noticed this many times but was too lazy to post.  So I see a message in my inbox that bounty is completed and now in grace period, however its title says that "bounty expiring soon"    Wonderful (not wonderful of course). I click it, and... guess what?    Ok. So 49 mins left. But the main problem is that time traveling is . (if it is not, please forbid it). Looking for a simple proof that groups of order $2p$ are up to isomorphism $\mathbb{Z}_{2p}$ and $D_{p}$ . Expected value of subset of variables in Bayesian setting Assume we have $N$ random variables $X_1, \ldots, X_N$ with known (posterior) distributions that are easy to sample from. For simplicity, assume that I am interested in the expected value of the ten largest of these random variables. There will be some uncertainty surrounding this expected value as there is uncertainty with respect to the rank of a given $X_i$ in case the distributions of $X_1, \ldots, X_N$ overlap. I want to use simulation based methods. My approach is to simulate $M$ samples from the distributions of $X_1, \ldots, X_N$, where in each iteration, I construct a binary indicator of length $N$ indicating whether random variable $i$ is within the set of the ten largest samples or not. Averaging over these $M$ draws gives me the probability that random variable $i$ is member of the top ten group. Denote this probability as $\pi_i$. Define a binary random variable that indicates membership in the top ten group as $S_i$. $S_i$ follows a Bernoulli distribution s.t. $S_i \sim Ber(\pi_i)$. In a second step, I draw $L$ samples from the distribution of $S_i$ and from the distributions of $X_1, \ldots, X_N$. Given a draw of $S_i$, I can select the top ten out of the samples of $X_1, \ldots, X_N$ in each iteration and average the respective samples within the top ten group. I save this average, so the result after $L$ iterations will be the distribution of the average outcome within the top ten group, taking into account all relevant sources of uncertainty. My questions are: Is this simulation approach valid in general? From a Bayesian perspective, is this simulation valid or do I need to treat additional quantities (e.g. $S_i$ or $\pi_i$) as random variables that need a prior? I have noticed after deleting an original page in WordPress with lets say a permalink of your_domain.com/contact/ and then trying to recreate the same page with the same name/slug, my WP is generating a "-2" at the end of the link, like: your_domain.com/contact-2/.  I don't understand why, since the original page was deleted. Why is WordPress treating new pages as if the original still exists? How to I clean WP caches, if such a thing even exists?Thank you ahead of time for clearing this up for me. Quotient group $SL(2,\mathbb{R})/SO(2,\mathbb{R})$ I am confused by expressions like $\mathbb{R}/\mathbb{Z}$, especially if I see something of the sort $SL(2,\mathbb{R})/SO(2,\mathbb{R})$. I don't know what to make of it. I understand what a quotient of a group for an equivalence looks like, but I can't get my head around expressions like above.   Is a quotient like this always a group and what do elements in the set $SL(2,\mathbb{R})/SO(2,\mathbb{R})$ look like? Show that G is a group, if G is finite, the operation is associative, and cancellation law holds Let $G$ be a non-empty finite set with an associative binary operation so that cancellation law holds, i.e. $ab=ac$ or $ba=ca$ implies $b=c$, for any choices of $a,b,c$ in $G$. Assume that there is an identity element $e$ in $G$. Show that $G$ is a group.  Proof: To show $G$ is a group, conditions must hold. Suppose that $ab=ac$, then $b=eb=(a^{-1}a)b =a^{-1}(ab)=a^{-1}(ac) =(a^{-1}a)c=ec=c$. So left cancellation holds in $G$.  2) Suppose $ba=ca$, then $b=be=b(aa^{-1}) =(ba)a^{-1}=(ca)a^{-1} =c(aa^{-1})=ce=c$. So right cancellation holds in $G$.  3) If $a$ exists in $G$ then $aa^{-1}=a^{-1}a=e$, where $a$ is an inverse of $a^{-1}$. Since inverses are unique, $(a^{-1})^{-1}=a$.  4) Let $x$ be the inverse of $ab$. Then $(ab)x=e$. By associativity we have $a(bx)=aa^{-1}$. Through left cancellation we have  $bx=a^{-1}bx=ea^{-1}=b(b^{-1}a^{-1})$ and $x=b^{-1}a^{-1}$.  Thus $(ab)^{-1}=b^{-1}a^{-1}$. So all conditions hold, $G$ is a group.  Is this proof correct? I know to show $G$ is a group these conditions have to be met. This is all I have to show right? Lets say I have a  creature that says "Whenever another creature enters the battlefield under your control, you may gain 1 life." and I currently have all 4 of them in the battlefield. Then I cast another creature and : Do I get 1 or 4 life? Does that effect trigger for every priest or just once? thanks for help What's the best way of accessing field in the enclosing class from the nested class? How to extrude and scale with an even offset? I'm quite new to Blender, so forgive me if this is a dumb question. I don't even know hot to describe it properly, so:      Basically I want to extrude a rectangle and then scale it along two axis, but without keeping the proportions; I want to reduce them of the same quantity, so that I get something similar to the frame of a picture. Is it possible to write some C or C++ code and compile to binaries, then use those binaries with php? Is it also possible to write a php library using C and C++ ?  If so, please tell how can I do so? When answers are posted within a question's initial grace period, it is possible that further edits could completely change the question (see ""), and render those first few answers incorrect.   Worse yet, nobody is notified that there was a change to the question, except those that are sitting on the page and notice the edit bar pop in. And of those, only those bothered enough to open it in a new window to compare the differences, will see how much was changed.   After the grace period is up, nobody will be able to consolidate why the first few answers actually answered a different question. And the answerers won't know unless someone comments or down-votes (and in the latter case, without context, they still might have trouble understanding, unless they memorized the question's initial state).  Jon Skeet stated it pretty well in  on :     I'd like this to apply to the question, as well as answers. Sometimes I (or others) have added perfectly good answers, but then the question has been changed within the grace period, making answers look foolish without any indication of what's happened.   So this time, my proposal is quite simple:     Once an answer is posted to a question within the initial grace period, a new grace period should start, and the current state of the question should be saved as the first revision. Further edits within the next 5 minutes will be aggregated into a new, second revision.   This will only noticeably affect questions where answers are posted within the grace period and the author of the question makes edits within 5 minutes of the first answer. (Effectively, it would treat it as if a different user made an edit within the author's grace period.) All other scenarios will continue to behave as they do today.  This feature request comes close:    However, the answer suggests a simple change to the wording or a pencil icon (like we see with edited comments), without adding a revision that can be viewed and compared. I don't think this is enough - in some cases it's going to be important to know what changed, not just when. I have an idea or subject that should have a Q&amp;A, and want to propose a new site. How can I do this?  Related: