Probability that a device turns off in n seconds At zero time a device is on, and can be turned on or off at any time.  Let $p_1, p_2, \dots$ the probabilities that the device is off at times $1, 2, \dots$.
What is the probability that the device will be turned off for the first time at time $n$?
EDIT:
I think that it can be solved just by:
$$(1-p_1)\times(1-p_2)\times \dots \times p_n$$
But I am not sure how to arrive this conclusion, as it seems to be backed on independent events, but I cannot be sure about the independence here.
 A: The question concerns a sample space $\Omega$ of sequences of observations of the light made at times $1, 2, 3, \ldots.$ For it to be answerable, we have to suppose that the switch can be flipped no more than once in any interval $(n-1,n]$ (for otherwise the observations do not determine when the switch is flipped).
$\Omega$ therefore can be identified with the set of all binary sequences
$$\Omega = \{\omega\mid \omega:\mathbb{N}\to \{0,1\}\}$$
where $\omega(0)=1$ indicates the light is on at time $0$ and generally at any time $n,$ $\omega(n)=1$ if and only if the light is on at time $n.$
Let $\mathcal{P}_i = \{\omega\mid \omega(i)=0\}$ be the set where the light is off at time $i.$  The problem supposes every $\mathcal{P}_i$ is an event for $i=0,1,2,\ldots$ and the associated probabilities of these events are
$$\Pr(\mathcal{P}_i)=p_i.$$
Any answer therefore boils down to representing the set
$$\mathcal{E}_n = \text{The light was first turned off in the interval }(n-1,n]$$
in terms of the events $\mathcal{P}_i.$
We can try to figure this out recursively.  Begin with $n=1:$ $\mathcal{E}_1$ is the event the light is not on at time $1.$  It is identical to $\mathcal{P}_1,$
$$\mathcal{E}_1 = \mathcal{P}_1.$$
When $n=2,$ $\mathcal{E}_2$ is the event "the light is not on at time $2$ but the light was still on at time $1.$"  In set notation, using overbars to denote complements (with respect to $\Omega$),
$$\mathcal{E}_2 = \mathcal{P}_2\cap \bar{\mathcal{P}_1}.$$
It consists of all sequences of the form $110\ldots\,.$
Because it is difficult to see how the chance of this intersection is determined by any of the specified probabilities $p_i,$ let's look for a counterexample.  Evidently, we can focus on the first three times $0,1,2.$
Consider, then, the family of probability functions $\mathbb{P}_\alpha$ given by this table:
$$\begin{array}{}
\omega & \mathbb{P}_\alpha \\
\hline 111\ldots & \alpha(1-p_1)\\
110\ldots  & (1-\alpha)(1-p_1)\\
101\ldots  & p_1 - p_2 + (1-\alpha)(1-p_1)\\
100\ldots  &  p_2 - (1-\alpha)(1-p_1)
\end{array}$$
The left hand column indicates the four events corresponding to the state of the light at times $0,1,$ and $2$ while the right hand column gives their probabilities.
For this to be a valid probability function, none of the chances can be negative.  This forces $\alpha$ to lie between $0$ and $1$  (to make the first two chances non-negative) and
$$\frac{p_2-p_1}{1-p_1}\le \alpha \le \frac{p_2}{1-p_1}$$
(to make the last two chances non-negative).  For instance, when $p_1=p_2=1/2,$ we must have $0\le \alpha \le 1.$ This demonstrates such probability families exist.
Now since $\mathcal{P}_1 = \{100\ldots, 101\ldots\}$ and $\mathcal{P}_2 = \{100\ldots, 110\ldots\},$ the axioms of probability give
$$\mathbb{P}_\alpha(\mathcal{P}_1) = \mathbb{P}_\alpha(100\ldots) + \mathbb{P}_\alpha(101\ldots) = p_1$$
and
$$\mathbb{P}_\alpha(\mathcal{P}_2) = \mathbb{P}_\alpha(100\ldots) + \mathbb{P}_\alpha(110\ldots) = p_2,$$
showing that these probability functions satisfy all the requirements of the problem.  However,
$$\mathbb{P}_\alpha(\mathcal{E}_2) = \mathbb{P}_\alpha(\mathcal{P}_2 \cap \bar{\mathcal{P}_1}) = \mathbb{P}_\alpha(110\ldots) = (1-\alpha)(1-p_1).$$
This looks like it can vary with $\alpha.$  Indeed, taking the example $p_1=p_2=1/2,$ these probabilities are
$$(1-\alpha)(1-1/2) = (1-\alpha)/2,$$
which (as we saw above) can be any value from $(1-0)/2=1/2$ down to $(1-1)/2=0.$
This proves the question does not generally have a unique answer.  In fact, the restrictions on $\alpha$ only imply
$$p_2 - p_1 \le \Pr(\mathcal{E}_2) \le p_2.$$
Similar inequalities must apply to the chances of all the other events $\mathcal{E}_3,$ $\mathcal{E}_4,$ etc.
A: To answer this question and confirm the answer that is proposed in the OP, I would first propose to slightly rephrase it as :

"A device is initially on and experiences a sequence of events $1, 2, \ldots$ which can turn it off. Each binary trigger event occurs with an independent probability given by a Bernouilli trial parameterized by respectively $p_1, p_2, \ldots$. What is the probability that the device is turned off for the first time at the $n^\text{th}$ event?"

First, if $n=1$, the answer is simply $p_1$, that's easy and that special case can be put to side.
For $n>1$, the final answer follows by stating that this happens at event $n$ if and only if (1) the switch was not triggered off at events $1, 2, \ldots, n-1$ and (2) that the switch is triggered off at event $n$.
For the first part, note that in general at a given event $k<n$, given that the switch is still on, the probability that the switch is not triggered off at this event $k$ is equal to $1-p_k$. In particular, the probability that the switch was not triggered off at event $1$ is $1-p_1$. Given that the switch was not triggered off at event $1$, the probability that it is not triggered at event $2$ is $1-p_2$, and so on.
For the second part, the probability that the switch is triggered off at event $n$ is simply $p_n$.
Since all draws are independent, probabilities are multiplied and the probability that the switch is triggered off for the first time at event $n$ is equal to:
$$
(1 - p_1) \times (1 - p_2) \times \ldots \times (1 - p_{n-1}) \times p_n 
$$
which confirms the intuition in the OP.
What may be confusing at first in the OP is the fact that the problem is set up as a temporal sequence and that we may need to consider the probability space of all "trajectories" of trigger events. Yet the problem is simpler as one asks in the OP the probability that event $n$ is triggered for the first time, and thus that all previous events are not triggered, and thus irrespective of a sequence (as would be explored in other answers).
