Check that each of the following is a valid probability function for a discrete random variable.

(i) g(n) = (2/3) (1/3)^(n-1), n=1,2,3,...

(ii) g(k) = (k+1) (2/3)^2 (1/3)^k, k=0,1,2,...

(Hint: use the formula (1-q)^(-2) = sum from zero to infinity of (n+1)q^n with 0<q<1.)