The standard way (other than generating up to N) is to check if (5N2+4) or (5N2−4) is a perfect square.
Had discussion with my friend, on this and hence I thought its a good information to share via blog.
More -
http://math.stackexchange.com/questions/9999/checking-if-a-number-is-a-fibonacci-or-not
Had discussion with my friend, on this and hence I thought its a good information to share via blog.
More -
http://math.stackexchange.com/questions/9999/checking-if-a-number-is-a-fibonacci-or-not
0 comments:
Post a Comment