Question: next fibonacci number

next_fib.mw

I want to find the next fib number in the sequence given an input number.

I know there are previous posts using a recurance formula...i don't want to do that.

I want my code to work like the nextprime command. but i have problems..

If the number i/p is not a fib no. .....error.  it needs to find the next actual fib no.

there is also the problem that because the first three fib numbers are 1, 1, 2, the next fib could be either 1 or 2 given an input of 1

Please Wait...