I need help with the following problem:

Given that

$$f(0) = 1,\\ f(1) = 1,\\ f(2) = 2,\\ f(2t) = f(t) + f(t + 1) + t\text{ (for }t > 1),\\ f(2t + 1) = f(t - 1) + f(t) + 1\text{ (for }t \ge 1).$$

I need to find the time $t$ that outputs the number $x$ (time $t$ might not exist). Can someone please help me convert this into finding the $t$ value instead of outputting $x$.

Pointers on what to look into would also be helpful.

I was not really good in maths during school your help would be highly appreciated.

Thank you, Omar.

  • $\begingroup$ What is $x$? Please update your question. $\endgroup$ Commented Jun 4, 2017 at 17:12
  • $\begingroup$ I think the problem is to find a $t$ with $f(t)=x$, i.e. the inverse function. $\endgroup$
    – user436658
    Commented Jun 4, 2017 at 17:16
  • $\begingroup$ x is the output so for example running the above on t = 2453 would output 8123 which is the x $\endgroup$ Commented Jun 4, 2017 at 17:17

1 Answer 1


Imo you do not need to solve this equation to get a formulae for $t$ in terms of $x$ (I am not sure one exists in this example).

I don't think that the system is stable due to the $t$ in the second equation.

I think you would need to store each successive $x$ and corresponding $t$ in a matrix, then check to see how many possible solutions there are, since I think you could have the situation of a one-to-many mapping between $t$ and $x$ values or vice versa or a many-to-many.

I suggest you get a graph of $t$ and $x$ using software like Matlab, Maple or SPSS, then look at its shape and for patterns.

I would calculate eg values of $(t,x) $up to eg $t=50000$, then look at the frequency of the $x$'s. Do any have have a frequency of more than one? If yes then there are $x$ values that are the same from using different values of $t$. Hence one $x$ value results in a set of possible $t$-values.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .