No.

Well, that's not true, you could make it a recursive algorithm instead, but...that's even less efficient.

Fibonacci numbers are a sequence - each term depends on the two value of the two previous terms. So in order to evaluate F(n), you need to know both F(n-1) and F(n-2), both of which depend on two earlier terms.

So no, you can't magically find the value of F(n) without a loop being involved. Unless you use that loop to generate all the values in advance and store them for your app to access - but since the sequence is unbounded, you don;t have space for that...:laugh:

15,922,407 members