What is the expected number of dice one needs to roll to get any monotonically increasing series of 1 to 6? Similar to:
"What is the expected number of dice one needs to roll to get 1,2,3,4,5,6 in order?"
but we allow repeats so 1,1,2,2,3,4,4,4,4,5,5,6 would count.
My answer (or simulation) is flawed as I cannot get reasonable agreement.
My C++11 simulation code is below. I fear that the 'bug' is more likely to be in my algebra
#include <iostream>
#include <random>

int main(int argc, char* argv[])
{
  int seed = 101;
  if ( argc>1 )
    seed = atoi(argv[1]);

  std::uniform_int_distribution<int> distribution(1,6);
  std::mt19937 engine(seed);
  auto generator = std::bind(distribution,engine);

  int rollForSequenceSum = 0;
  int multiples = 1000;
  for ( int i=0; i<multiples; ++i )
  {
    int rollCount = 0;
    int nextInSequence = 1;

    while ( nextInSequence <= 6 )
    {
      ++rollCount;
      int random = generator();
      if ( random == nextInSequence )
      {
        ++nextInSequence;
      } 
      else if ( random == (nextInSequence-1) )
      {
        //Do nothing
      } 
      else if ( random == 1 )
      {
        nextInSequence = 2;
      }
      else
      {
        nextInSequence = 1;
      }
    }
    rollForSequenceSum += rollCount;
  }
  double mean = (double) rollForSequenceSum / (double) multiples;
  std::cout << mean << std::endl;
}

 A: I'm posting my algebra and reasoning below. Thanks to robjohn and EMS for independently reaching an answer which agrees with my simulation and corrected algebra.
Let $N_i$ be the expected number of throws taken to have got $i$ in the sequence.
$N_6$ is the expected number of throws for the game to end.
$N_1 = \frac{1}{6}.1 + \frac{5}{6}(1+N_1)$ 
as there is a 1 in 6 chance of getting to $N_1$ in a single throw and a $\frac{5}{6}$ chance of wasting a throw and needing to throw the dice another $N_1$ times.
$N_2 = N_1 + \frac{1}{6}.1 + \frac{1}{6}(1+N_2-N_1) + \frac{4}{6}(1+N_2)$
as one must be at 1 already which takes $N_1$ throws and one has a 1 in 6 chance of rolling a 2, a 1 in 6 chance of rolling a 1 thus wasting a throw but only having to start from 1, and a 4 in 6 chance of rolling anything other than 1 or 2 in which case a throw is wasted and one has to start again from scratch.
$N_3 = N_2 +\frac{1}{6}.1 + \frac{1}{6}(1+N_3-N_1) + \frac{1}{6}(1+N_3-N_2) + \frac{3}{6}(1+N_3)$
as one must be at 2 already which takes $N_2$ throws and one has a 1 in 6 chance of rolling a 3, a 1 in 6 chance of rolling a 1 thus wasting a throw but only having to start from 1, a 1 in 6 chance of rolling a 2 thus wasting a throw but only having to start from 2, and a 3 in 6 chance of rolling anything other than 1, 2 or 3 in which case a throw is wasted and one has to start again from scratch.
Similarly
$N_4 = N_3+\frac{1}{6}.1 + \frac{1}{6}(1+N_4-N_1) + \frac{1}{6}(1+N_4-N_3) + \frac{3}{6}(1+N_4),$
$N_5 = N_4 +\frac{1}{6}.1 + \frac{1}{6}(1+N_5-N_1) + \frac{1}{6}(1+N_5-N_4) + \frac{3}{6}(1+N_5),$
$N_6 = N_5 +\frac{1}{6}.1 + \frac{1}{6}(1+N_6-N_1) + \frac{1}{6}(1+N_6-N_5) + \frac{3}{6}(1+N_6).$
These are linear simultaneous equations which one can solve to get:
$N_1 = 6$
$N_2 = 5.N_1 + 6$
$N_3 = 5.N_2$
$N_4 = 5.N_3$
$N_5 = 5.N_4$
$N_6 = 5.N_5$
or
$N_1 = 6$
$N_2 = 36$
$N_3 = 180$
$N_4 = 900$
$N_5 = 4500$
$N_6 = 22500$
