Gets the position along the Fibonacci sequence for any number (n). I've personally found that utilizing the Fibonacci progression times a number often gives a steady increase that's useful for experience points and the like (it's never twice the number except from 2-3, therefore better than most exponential increases). Here ya go.
Just so you know, the reason the FOR loop is from 2 to n is because the first two numbers in the sequence are supposed to be 1. Depending on how you want to use this sequence, you might want to alter that.
FUNCTION fib(n)
a=1
b=1
c=1
FOR i=2 TO n
c=a+b
a=b
b=c
NEXT i
ENDFUNCTION c