How does the flower exhibit the Fibonacci number

Fibonacci sequence

The Fibonacci sequence is a series of numbers in which each number is the result of adding together the two preceding numbers. It starts with 0 and 1, and the sequence continues as 0, 1, 1, 2, 3, 5, 8, 13, 21, and so on.

Fibonacci spiral

Fibonacci in a spiral is a mathematical and artistic concept. We can create a sequence of squares with side lengths corresponding to Fibonacci numbers, and we can arrange them in a spiral pattern. The next number in the Fibonacci sequence determines each square’s side length.

Let’s look at the sequence below:

1 of 6

Let’s discuss how it works:

  • We add a square with a side length of 1 unit.

  • We add another square with a side length of 1 unit adjacent to the first square.

  • We continue adding squares with side lengths corresponding to Fibonacci numbers (1, 2, 3, 5, 8, 13, etc.), positioning them in a spiral pattern.

Fibonacci spiral in seashells

The Fibonacci spiral appears in the patterns of seashells, specifically in the arrangement of the shell chambers.

The sea animal, nautilus, grows its shell in a spiral pattern. As the animal inside the shell grows, it adds new chambers to accommodate itself. Each new chamber is larger than the previous one and this growth follows the Fibonacci sequence in terms of the number of chambers added.

Look at the image below to visualize the seashell pattern:

Fibonacci spiral
Fibonacci spiral

The center of a flower exhibits the Fibonacci sequence

Many flowers, like sunflowers, showcase a spiral pattern that follows the Fibonacci sequence. The seeds in the center of a sunflower are arranged in spirals that follow the Fibonacci sequence.

Look at the sunflower image below:

Center of the flower
Center of the flower

Note: Not all flowers with spiral arrangements follow the Fibonacci sequence, but many do. The appearance of these mathematical patterns in nature has been the subject of many scientific investigations.

Let’s write down a code below that prints a Fibonacci series:

#include <iostream>
using namespace std;
int main() {
int numTerms = 9; // Number of terms in the Fibonacci series
int firstTerm = 0; // First term of the series
int secondTerm = 1; // Second term of the series
cout << firstTerm << ", " << secondTerm << ", "; // Print the first two terms
for (int i = 2; i < numTerms; i++) {
int nextTerm = firstTerm + secondTerm; // Compute the next term
cout << nextTerm;
if (i != numTerms - 1) {
cout << ", "; // Add comma if it's not the last term
}
// Shift terms for the next iteration
firstTerm = secondTerm;
secondTerm = nextTerm;
}
cout <<endl; // Move to the next line
return 0;
}

Explanation

  • Line 5: The numTerms variable is set to 9, which represents the desired number of terms in the Fibonacci series.

  • Line 6: The firstTerm variable is initialized with 0, representing the first term of the series.

  • Line 7: The secondTerm variable is initialized with 1, representing the second term of the series.

  • Line 11: A for loop is used to generate the remaining terms of the Fibonacci series. The loop starts from i = 2 because the first two terms have already been printed in line 9.

  • Line 12: The nextTerm variable is computed by adding the previous two terms (firstTerm and secondTerm).

  • Line 20–21: The firstTerm and secondTerm variables will be updated for the next Fibonacci number.

Free Resources

Copyright ©2026 Educative, Inc. All rights reserved