Geometric Sequence Calculator

Geometric Sequence Calculator

Calculation Results

Value of the -th term:

Sum of the first terms:

Formula used: aₙ = a₁ × r⁽ⁿ⁻¹⁾

function calculateGeometricSequence() { var a1 = parseFloat(document.getElementById('firstTerm').value); var r = parseFloat(document.getElementById('commonRatio').value); var n = parseInt(document.getElementById('termIndex').value); var resultDiv = document.getElementById('geometricResult'); if (isNaN(a1) || isNaN(r) || isNaN(n) || n < 1) { alert("Please enter valid numbers. Term (n) must be at least 1."); return; } // Calculate n-th term: a_n = a1 * r^(n-1) var nthTerm = a1 * Math.pow(r, n – 1); // Calculate partial sum: Sn = a1 * (1 – r^n) / (1 – r) var sum; if (r === 1) { sum = a1 * n; } else { sum = a1 * (1 – Math.pow(r, n)) / (1 – r); } // Format numbers for display var formattedNthTerm = (nthTerm % 1 === 0) ? nthTerm : nthTerm.toFixed(4); var formattedSum = (sum % 1 === 0) ? sum : sum.toFixed(4); document.getElementById('resTermIndex').innerText = n; document.getElementById('resSumIndex').innerText = n; document.getElementById('nthTermValue').innerText = formattedNthTerm; document.getElementById('sumValue').innerText = formattedSum; resultDiv.style.display = 'block'; }

Understanding Geometric Sequences

A geometric sequence (also known as a geometric progression) is a sequence of numbers where each term after the first is found by multiplying the previous one by a fixed, non-zero number called the common ratio (r).

Key Formulas

  • The N-th Term Formula: aₙ = a₁ × r⁽ⁿ⁻¹⁾
  • The Sum Formula (Finite): Sₙ = a₁(1 – rⁿ) / (1 – r), where r ≠ 1
  • Sum for r = 1: Sₙ = a₁ × n

Practical Example

Imagine you have a bacterial culture that doubles every hour. You start with 5 bacteria (a₁ = 5). Since it doubles, your common ratio (r) is 2. To find how many bacteria you will have at the 6th hour (n = 6):

  1. Step 1: Apply the formula a₆ = 5 × 2⁽⁶⁻¹⁾
  2. Step 2: Calculate the exponent: 2⁵ = 32
  3. Step 3: Multiply: 5 × 32 = 160

After 6 hours, you would have 160 bacteria. Using the sum formula, you could also calculate the total number of "bacteria-hours" experienced by the culture during that time.

Types of Geometric Sequences

The behavior of the sequence depends entirely on the value of the common ratio:

  • Growth (r > 1): The terms increase exponentially (e.g., 2, 4, 8, 16…).
  • Decay (0 < r < 1): The terms decrease toward zero (e.g., 100, 50, 25, 12.5…).
  • Alternating (r < 0): The terms switch between positive and negative values (e.g., 3, -6, 12, -24…).

Frequently Asked Questions

Can the common ratio be zero?
No, in a standard geometric progression, the common ratio (r) should not be zero, as it would make all terms after the first zero, losing the properties of a geometric sequence.

What is an infinite geometric series?
If the absolute value of the ratio |r| < 1, the sum of the sequence as n approaches infinity converges to a specific number using the formula: S∞ = a₁ / (1 – r).

Leave a Comment