Bernoulli trial: probability of even times of sum of $7$. 
We throw a pair of dice unlimited number of times. For any $n\in \Bbb N$,
  let $$E_n=\text{"at the first n trials, the number of time we get sum of $7$ is even"}$$
  Also let $P_n=P(E_n)$. We need to calculate $P_n$ (in terms of $n$).



*

*So I have used a recurrence relation (for $n>1$): $$P_n=\frac56 P_{n-1}+\frac16(1-P_{n-1})$$ and got $P_n=1/2\cdot(2/3)^n+1/2$, for $P_1=30/36=5/6$.

*Now, I need to to calculate $P_n$ in Bernoulli trial.

 A: Here's a solution with generating functions. Let $p(x)=5/6+x/6$ be the generating function for the number of sevens when you throw the dice once. If you throw the dice $n$ times, the generating function is $p(x)^n.$ To extract the even powers only, you consider ${p(x)^n+p(-x)^n\over 2}$, and to get the required probability you set $x=1$. The answer is therefore $$P_n= {p(1)^n+p(-1)^n\over 2}={1\over 2}\left( 1+\left({2\over 3}\right)^n\right).$$ 
A: Let $p$ be the probability of obtaining a sum of seven on a single throw.   This is a 'success' in a single Bernoulli trial.   What is the value of $p$?
Then the count of successes in $n$ trials has a Binomial distribution. $$N_n\sim\mathcal {Bin}(n, p)$$
What is the formula for $\mathsf P(N_n=k)$ ?
What then is the formula for $\mathsf P(E_n)$ ?   Where $E_n$ is: the event that $N_n$ is even.
$$\begin{align}\mathsf P_n ~=~& \mathsf P(E_n) \\[1ex] ~=~& \ldots\end{align}$$

Hint: also find the the probability that $N_n$ is odd, $\mathsf P(E_n^\complement)$, in a similar way and use $\mathsf P(E_n)+\mathsf P(E_n^\complement)~=~1$ to simplify the series.
