Coin flip with specific conditions. 
In the beginning A=0. Every time you toss a coin, if you get head, you increase A by 1, otherwise decrease A by 1. Once you tossed the coin 7 times or A=3, you stop. How many different sequences of coin tosses are there?

The tricky part of this problem is the combination of the requirements, so it seems that recursion could be useful. If $P_n$ is the number of ways before A=3 and n flips, I'm not sure on the recurrence. Of course, this problem could also be solved with a tree, but I'm looking for a cleaner solution.
 A: The sequences where $A=3$ is reached early can only be of length $3$ or $5$, since $A$ changes parity at every flip. It is easy to list out these early stops:
$$HHH\qquad HHTHH\qquad HTHHH\qquad THHHH$$
The $HHH$ prefix removes $2^4-1=15$ sequences from the $2^7=128$ $7$-flip sequences, and each of the length-$5$ prefixes removes $2^2-1=3$ sequences. Thus there are $128-15-3×7=92$ admissible sequences.
A: Continue flipping even after having reached $A=3$.
There are $2^7$ different sequences of seven flips.
All sequences of the form HHHxxxx should have counted the same.  There are $2^4$ such sequences that we wanted to count only one time, so we subtract by $2^4-1$ to correct the count so as to have it that we counted all of these exactly once.
All sequences of the form THHHHxx should have counted the same.  There are $2^2$ such sequences...
All sequences of the form HTHHHxx should have counted the same.
All sequences of the form HHTHHxx should have been counted the same.
Note, we do not bother with HHHTHxx or HHHHTxx since these both fall into the first case as they start with three heads.
Also, no special consideration needs to be taken for having reached $A=3$ on the seventh flip and it is impossible for $A=3$ to have occurred on any other flip other than the third or fifth or seventh as $A$ is always even on an even numbered flip.
We get then a total of:
$$2^7-(2^4-1)-3\times (2^2-1)$$
