How to Tell if a Number is a Fibonacci Number
You can probably recognize the one-digit and two-digit Fibonacci numbers by sight: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 -- but can you tell by sight whether larger integers are Fibonacci numbers? Is 987 a Fibonacci number? Is 857732 a Fibonacci number?
One way to tell whether or not a number is part of the Fibonacci sequence is to reconstruct the sequence up to the number you are testing. However, this is time-consuming for large numbers like 354224848179261915075, which happens to be the 100th Fibonacci number. Luckily, there is another simpler test that can give you a yes or no answer with less work.
Read full article from How to Tell if a Number is a Fibonacci Number
No comments:
Post a Comment