How many times do I have to roll a die to get six six times in a row? I wonder if there's any exact way to find out these two things about six-sided dice:


*

*How many throws would be necessary to get six times the same number (let's say six) in a row?

*What's the probability of getting six times the same number (again, let's say six) in a row within 100 throws?


I wrote a simple simulation program in C and tried it on $100*2^{20}$ numbers, but I want to  compare my numbers and see if I can skip the programming part in future.
For the first question, I got number around $54160$, and for the second one it was $1861/1048576 \approx 0.001775$. I was told that my numbers should be smaller and bigger respectively. Is there any chance for my numbers to be OK? Otherwise it would mean that I made a mistake in my code. 
 A: Regarding question 1, there is a very simple and elegant way to obtain a result via Martingale Theory (refer to the best (in my humble opinion) introductory book on the subject Probability with Martingales chapter 10 section 11). The proof requires hardly any calculations and is done in 3 steps provided that you use several martingale theory results (Doob's optional stopping time theorem in particular). Look it up!  
QUESTION: What is the expected time for a monkey to type ABRACADABRA on a typewriter, provided that you only have 26 keys (the letters of the alphabet) and his typing is random (so 1/26 chances of producing any given letter at any time?
Try solving this with standard recursive methods!
ANSWER:
$E\left ( T \right ) = 26^{11} + 26^{4} + 26$
Had the chain been ABCDEFGHIJK it would have required (26^11), so although this might seem counter-intuitive, randomly producing chains that have symmetry or a repetitve pattern takes longer on average.   
The general rule is the following:
$E\left ( T \right )= \sum_{k = 1}^{n}\left ( \frac{1}{p} \right )^{k}\times I_{pattern}\left ( n - k + 1 \right )$
where n is the length of the chain, p the probability of typing any given character, and 
$$
I_{pattern}(k) = 
\begin{cases}
1 & \text{if pattern(j) $=$ pattern(k + j - 1) } \forall j \in \left \{1,...,n-k+1\right \}\\
0 & \text{otherwise.}
\end{cases}
$$
In your case, since the pattern is simply a repitition of 6s, the average time (i.e. average number of rolls) is  $6^{6} + 6^{5} + ... + 6$
