Please help on this problem:
We denote the function F by:
\begin{cases} F(x) = 1 & x\leq 2 \\ F(x) = F(x — 1) + F(x — 2) + x & x > 2 \end{cases}
Given q (1 ≤ q ≤ 105) queries. The queries are characterized by two numbers l, r (1 ≤ l ≤ r ≤ 109). Find: