Check Fibonacci Number

Enter a number to check if it's part of the Fibonacci sequence:

Fibonacci Sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21, ...
Each number is the sum of the two preceding numbers

The Fibonacci Sequence

The Fibonacci sequence is one of the most famous mathematical sequences in history. Named after the Italian mathematician Leonardo Fibonacci, it appears in nature, art, and has numerous mathematical properties.

What is the Fibonacci Sequence?

๐Ÿ“Š Definition

Each number is the sum of the two preceding numbers
Starts with 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144...

๐Ÿ”ข Formula

F(n) = F(n-1) + F(n-2)
F(0) = 0
F(1) = 1

๐ŸŽจ Golden Ratio

As numbers get larger, ratio approaches ฯ† (golden ratio)
ฯ† = (1 + โˆš5) / 2 โ‰ˆ 1.6180339887

Fibonacci Numbers Table

Position (n) Fibonacci Number Ratio F(n)/F(n-1) Properties
1 0 - Starting number
2 1 - First non-zero
3 1 1.0 Appears twice
4 2 2.0 First even number
5 3 1.5 Odd number
6 5 1.666... Odd number
7 8 1.6 Even number
8 13 1.625 Odd number
9 21 1.615 Odd number
10 34 1.619 Even number

โœจ Fun Fact: As you move further in the sequence, the ratio between consecutive Fibonacci numbers approaches the golden ratio (ฯ† โ‰ˆ 1.618), which appears in art, architecture, and nature.

Mathematical Properties of Fibonacci Numbers

๐Ÿ” Divisibility

Every 3rd number is even
Every 4th number is divisible by 3
Every 5th number is divisible by 5

โž— GCD Property

GCD(F(m), F(n)) = F(GCD(m,n))
Greatest common divisor of any two Fibonacci numbers

โž• Addition

F(a+b) = F(a+1)ร—F(b) + F(a)ร—F(b-1)
Addition formula for Fibonacci numbers

Fibonacci in Nature

Natural Phenomenon Fibonacci Pattern Example
Plant Growth Leaf arrangement Pinecones, sunflowers
Animal Reproduction Rabbit population Fibonacci's original problem
Shell Spirals Nautilus shell Golden spiral pattern
Tree Branching Branch distribution Oak and elm trees
Hurricane Spirals Spiral arms Storm cloud patterns
DNA Structure Helix turns Genetic material

Fibonacci in Art and Architecture

๐ŸŽจ Golden Rectangle

Rectangle with sides in golden ratio
Considered most aesthetically pleasing
Used in painting and photography

๐Ÿ›๏ธ Parthenon

Ancient Greek temple proportions
Uses golden ratio extensively
Architectural harmony

๐ŸŽต Music

Fibonacci in musical scales
Instrument string lengths
Rhythm and timing

Testing Methods for Fibonacci Numbers

๐Ÿงฎ Mathematical Formula

Check if 5nยฒ+4 or 5nยฒ-4 is perfect square
Efficient for large numbers
O(1) time complexity

๐Ÿ”ข Sequence Generation

Generate Fibonacci numbers until reaching n
Simple and intuitive
O(log n) time complexity

๐Ÿ“Š Matrix Exponentiation

Advanced mathematical method
Very efficient for large n
Used in computer algorithms

Fibonacci in Computer Science

  • Dynamic Programming: Classic example of memoization and tabulation
  • Algorithm Analysis: Used to demonstrate recursive vs iterative solutions
  • Data Structures: Fibonacci heaps are advanced data structures
  • Sorting Algorithms: Some sorting methods use Fibonacci numbers
  • Cryptography: Used in some encryption algorithms

Large Fibonacci Numbers

The growth rate of Fibonacci numbers follows the golden ratio:

  • F(n) โ‰ˆ ฯ†^n / โˆš5 (where ฯ† is the golden ratio)
  • The sequence grows exponentially
  • F(100) has 21 digits
  • F(1000) has 209 digits
  • F(10000) has 2090 digits

Fibonacci and the Golden Ratio

Mathematical Relationship Formula Value
Golden Ratio ฯ† = (1 + โˆš5) / 2 1.6180339887498948...
Fibonacci Ratio lim(nโ†’โˆž) F(n+1)/F(n) 1.6180339887498948...
Golden Ratio Conjugate ฯ† - 1 = 1/ฯ† 0.6180339887498948...
Lucas Numbers Ratio L(n+1)/L(n) Approaches ฯ†

Historical Significance

๐Ÿ‘ค Leonardo Fibonacci

Italian mathematician (1170-1240)
Introduced sequence to Europe
Originally studied rabbit population

๐Ÿ“œ Ancient Origins

Sequence known in ancient India
Appears in Sanskrit poetry
Used in Indian mathematics

๐ŸŒ Global Discovery

Independently discovered by different cultures
Appears in Chinese mathematics
Known to Greek mathematicians

Practical Applications Today

  • Financial Markets: Technical analysis uses Fibonacci retracements
  • Computer Graphics: Fibonacci spirals in 3D modeling
  • Medical Imaging: Spiral patterns in MRI and CT scans
  • Sports Training: Periodization using Fibonacci cycles
  • Game Development: Procedural generation using Fibonacci numbers
  • Urban Planning: Traffic flow optimization using Fibonacci patterns