### 1567 - A simple stone game

Posted:

**Mon Apr 06, 2015 8:52 pm**I have generated Some pattern for this problem But how actually solve is out of my capabilities :(

Some observation :

1 . k = 1 , lossing Pos = 2, 4 , 8 , 16 , .... (2 ^ i )

2 . k = 2 , Losing Pos follows This : T(n) = T(n-1) + T(n-2)

3. k = 3 , Losing Pos Follow : T(n) = T(n-1) + T(n-4)

4 . k = 4 , Losing Pos follow : T(n) = T(n - 1) + T(n - 6)

5 . k = 5 , Losing Pos follow : T(n) = T(n - 1) + T(n - 8)

6. k = 6 , Losing Pos follow : T(n) = T(n - 1) + T(n - 10)

So in general k = p , k > 1 , Losing Pos follow T(n) = T(n-1) + T (n - 2*k+2 )

Now I have derived it , How am I supposed to find if a given N follow the formula or not ,,

Any Hint Please :)

Some observation :

1 . k = 1 , lossing Pos = 2, 4 , 8 , 16 , .... (2 ^ i )

2 . k = 2 , Losing Pos follows This : T(n) = T(n-1) + T(n-2)

3. k = 3 , Losing Pos Follow : T(n) = T(n-1) + T(n-4)

4 . k = 4 , Losing Pos follow : T(n) = T(n - 1) + T(n - 6)

5 . k = 5 , Losing Pos follow : T(n) = T(n - 1) + T(n - 8)

6. k = 6 , Losing Pos follow : T(n) = T(n - 1) + T(n - 10)

So in general k = p , k > 1 , Losing Pos follow T(n) = T(n-1) + T (n - 2*k+2 )

Now I have derived it , How am I supposed to find if a given N follow the formula or not ,,

Any Hint Please :)