Guys, I made it. I taken a list and calculated the Q(n) in a "for" loop - as Denise Roßberg and HonFu mentioned, step by step for one "n", using the two results Q(n-1) and Q(n-2), that were in the list before. This algorithm is super fast. Now it calculates here for millions. For example Q(50,000,000) = 25,371,105. And that was not even the biggest (n) here. Thanks.