Geometric random variable and stopping time Suppose that $N$ is a geometric random variable with parameters $p \in (0,1)$ and its support is $\mathbb Z^{\ge0}$. 
Let $\{X_k\}_{k\in \mathbb{Z}^+}$ be a sequence of independent bernoulli random variables independent of $N$.
Let $$\qquad Y=\sum_{k=1}^N X_k.$$
If we want to findthe generating function $P_Y$ of $Y$, do we always need to set $P(N=k) = q^{k-1}p , k\ge1$? 
A textbook makes this adjustment in an example, but my professor does not do this adjustment in solving another problem, and sometimes my professor uses $\sum_{k=0}^N$, so I am confused.

If you are confused about what my question is, here are two examples:


 A: There are two morally equivalent, but slightly different, ways to define a geometric random variable. The setup is the same for both: we are repeating independent Bernoulli trials until the first time we encounter something designated as a "success" (which has probability $p$ on each trial).


*

*We can let $X$ be the position of the first success. In this formulation, $X$ can be $1$ (if the first attempt is a success) or any higher integer. When we go this route, we have $\mathbb P(X = k) = q^{k-1}p$; for instance, if $X = 3$, this indicates that the first success was observed on the third attempt, so we had two failures followed by one success for a probability of $q^{3-1}p$.


or


*We can let $X$ be the number of failures observed before the first success. If we go this route, then $X$ can be $0$, which would again correspond to the case when the first attempt is a success. In this case, we would use $\mathbb P(X = k) = q^k p$. For instance, if we say $X = 3$, we now mean that three failures were observed before the first success (i.e. the first success was on the fourth attempt), for a probability of $q^3 p$.


The top source you cited chooses route 1, and the bottom source chooses route 2. The difference between the routes is (a) important, (b) annoying, and (c) totally uninteresting. Which one an author chooses is simply a matter of convention and nothing more. An author's job is to make this choice explicit somewhere, and reader's job is to find that declaration and proceed from it.
Note that the Wikipedia article on geometric variables acknowledges both approaches, and in fact, repeats all its calculations for both scenarios.
