def dm_fibonancci(n):
  """
  Finding the dm_Fibonacci sequence with seeds of 1, 1, 2 for n = 0, 1, 2 respectively
  The sequence is 0,1,1,2,3,5,8,13,..., where 
  the recursive relation is dm_fibonancci(n) = dm_fibonancci(n-1) + 2* dm_fibonancci(n-2) - dm_fibonancci(n-3)
  :param n: the index, starting from 0
  :return: the sequence
  """
  # assume n is positive integer
  n = n//1 if n>=1 else 0 # ensure n is non-negative integer
  c1=1
  c2=2
  c3=-1
  if n>2:
    return c1* dm_fibonancci(n-1) + c2* dm_fibonancci(n-2) + c3* dm_fibonancci(n-3)

  # n should be <= 1 here. Anything greater than 0, assume it's 1
  return 2 if (n==2) else 1 if (n==1) else 1