Test if a number is fibonacci
A positive integer ω is a Fibonacci number if and only if either 5ω2 + 4 or 5ω2 - 4 is a perfect square.
See The Fabulous Fibonacci Numbers for more.
A very nice test is that N is a Fibonacci number if and only if 5 N^2 + 4
or 5N^2 – 4
is a square number. For ideas on how to efficiently test that a number is square refer to the SO discussion.
Hope this helps