Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Recurrence Relation Calculator (General Term with Steps)

Enter the first term a₁, the coefficient p and the constant q of the recurrence relation a(n+1) = p·a(n) + q. The formula below is linked to the input fields, so you can also edit the numbers right inside it.

Enter numbers only. Decimals, negative numbers and fractions such as 1/2 are OK. If "Term number n" is left blank, it is treated as 10.
Result and graph
Enter the first term and the coefficients in the fields on the left and press "Calculate". The result and a graph will appear here.

What you can do on this page

  • Finds the general term of the first-order recurrence relation \(a_{n+1} = p a_n + q\) (with first term \(a_1\)) on the spot, with steps that use the characteristic equation to turn it into a geometric sequence
  • Answers are exact fractions in lowest terms, such as \(\dfrac{381}{64}\). The special cases \(p = 1\) (arithmetic sequence) and \(q = 0\) (geometric sequence) are handled automatically
  • Also shows the value of the term at the position \(n\) you choose (the \(n\)th term), plus a table and graph of terms 1 to 10. If the sequence converges, you also get the value it approaches (the limit, which is the equilibrium value)
  • The first term and the coefficients can be decimals, negative numbers or fractions such as 1/2
  • The calculator shows the recurrence relation just as you would write it by hand, and you can edit the numbers right inside it
  • A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
This page handles the first-order recurrence relation \(a_{n+1} = p a_n + q\) (\(p\) and \(q\) are constants). It does not handle forms that contain \(n\), such as \(a_{n+1} = a_n + n\), or second-order recurrence relations that involve \(a_{n+2}\).

What is this calculation used for?

Track how a loan balance goes down each month (money and life planning)

For a loan that charges interest every month and is paid down by a fixed amount every month, the balance moves by exactly the first-order recurrence relation "next month's balance = (1 + monthly rate) × this month's balance − monthly payment".
For example, with a monthly rate of 0.5% and a monthly payment of $1,500, the equilibrium value is 1500 ÷ 0.005 = 300,000 dollars. This is the loan amount at which interest and payments balance exactly and the balance stops moving. If the balance is below it, every payment makes it go down for sure (this balance idea is the basis of repayment planning).

Estimate where the level of a daily medicine settles (medicine and pharmacy)

The body breaks down and removes a medicine at a steady rate over time. In a model where "50% of the medicine is still in the body after one day, and you take 200 mg every day", the amount in the body follows the recurrence relation \(a_{n+1} = 0.5a_n + 200\) and converges to the equilibrium value 200 ÷ (1 − 0.5) = 400 mg.
This formula shows that even if you keep taking it every day, it does not build up forever; it settles at a steady level. In real drug design, doses and intervals are set with pharmacokinetic models that make this kind of calculation more precise.

Where a subscription's member count levels off (business)

For a service where "90% of members stay each month and 1,000 new people sign up", the member count follows the recurrence relation \(a_{n+1} = 0.9a_n + 1000\) and converges to the equilibrium value 1000 ÷ (1 − 0.9) = 10,000 people.
So if sign-ups and the churn rate stay the same, membership levels off at about 10,000. This is a basic business-planning model for estimating the ceiling on growth and how much higher that ceiling goes if you lower the churn rate (a rough guide that assumes the retention rate and sign-ups stay constant).

How a room warms up with the heat on (home and physics)

When you heat a cold room, the gap between the room temperature and the thermostat setting shrinks by a steady percentage every minute. For example, if "every minute, the gap between the room temperature and the setting of 77°F shrinks by 10%", the room temperature follows the recurrence relation \(a_{n+1} = 0.9a_n + 7.7\) and converges to the equilibrium value 7.7 ÷ 0.1 = 77°F, the thermostat setting.
"It warms up quickly at first, then more slowly as it gets close to the setting" is exactly what converging looks like for this recurrence relation (in physics, it is a minute-by-minute version of Newton's law of cooling).

Write the growth of a savings plan as a formula (money and investing)

The balance of a savings plan where "interest is added at the end of each month, and you also deposit a fixed amount every month" follows the same kind of recurrence relation: "next month's balance = (1 + monthly rate) × this month's balance + deposit". Here, though, the multiplier is greater than 1, so it does not converge and the balance keeps growing (an example that diverges).
Finding the general term lets you calculate "the balance after n months" in one step. It is the same as the future value of an annuity formula used in finance. Estimates of how much you will save are made with the general term of this recurrence relation.

Formulas and graphs

First-order recurrence relation
Graph
Standard notation (the usual math form)
\(a_{n+1}\) \(=\) \(p\) \(\times\) \(a_n\) \(+\) \(q\)
In words (symbols replaced with words)
④ \(a_{n+1}\): next term \(=\) ② \(p\): multiplier \(\times\) ① \(a_n\): current term \(+\) ③ \(q\): number added
The formula in words
① Take the \(a_n\): current term , multiply it by the
② \(p\): multiplier , add the
③ \(q\): number added ,
④ and you get the \(a_{n+1}\): next term
Quick example
With first term \(a_1 = 1\) and the recurrence relation \(a_{n+1} = 2a_n + 3\) (double the current term and add 3), the sequence starts like this
next term \(=\) 2 \(\times\) current term \(+\) 3
\(a_2 = 2 \times 1 + 3 = 5\)
\(a_3 = 2 \times 5 + 3 = 13\)
\(a_4 = 2 \times 13 + 3 = 29\)
Key idea
A recurrence relation is a rule that makes the next term from the current term. With the first term \(a_1\) and the rule, the whole sequence \(a_2\), \(a_3\), … follows in order. But to find term 100 this way, you would have to calculate 99 times. That is why we want the general term, a formula that gives the \(n\)th term directly from \(n\). The tool for finding it is the characteristic equation, explained next.
The characteristic equation and the equilibrium value
Standard notation (the usual math form)
\(c\) \(=\) \(q\) \(\div\) \(1 - p\)
In words (symbols replaced with words)
③ \(c\): equilibrium value \(=\) ① \(q\): number added \(\div\) ② \(1 - p\): 1 minus the multiplier \(p\)
The formula in words
① Replace both \(a_{n+1}\) and \(a_n\) in the recurrence relation with \(x\) and solve the equation \(x = px + q\) (the characteristic equation). Divide the \(q\): number added by
② \(1 - p\): 1 minus the multiplier \(p\) ,
③ and you get the \(c\): equilibrium value
Quick example
The characteristic equation of the recurrence relation \(a_{n+1} = 2a_n + 3\) is \(x = 2x + 3\). Solving it gives
\(c\): equilibrium value \(=\) number added (3) \(\div\) \(1 - 2\)
\(x = 2x + 3\)
\(x - 2x = 3\)
\(-x = 3\)
\(x = -3\)
\(c = \dfrac{3}{1-2} = -3\)
Key idea
The solution \(c\) of the characteristic equation \(x = px + q\) is a special value: if a term ever equals it, the next term is exactly the same value (indeed \(c = pc + q\), so after \(c\) the sequence stays at \(c\)). For this reason, the equilibrium value is also called the fixed point of the sequence. You can solve the equation by moving terms, or just use the formula \(c = \dfrac{q}{1-p}\). Since the denominator is \(1 - p\), the characteristic equation does not work only when \(p = 1\) (that case is an arithmetic sequence, covered in a separate formula card below).
Rewriting with the equilibrium value (making a geometric sequence)
Standard notation (the usual math form)
\(a_{n+1} - c\) \(=\) \(p\) \(\times\) \((a_n - c)\)
In words (symbols replaced with words)
③ \(a_{n+1} - c\): gap between the next term and the equilibrium value \(=\) ② \(p\): multiplier \(\times\) ① \(a_n - c\): gap between the current term and the equilibrium value
The formula in words
① Multiply the \(a_n - c\): gap between the current term and the equilibrium value by the
② \(p\): multiplier ,
③ and you get the \(a_{n+1} - c\): gap between the next term and the equilibrium value (looking only at the gaps, they form a geometric sequence with common ratio \(p\))
Quick example
Rewriting the recurrence relation \(a_{n+1} = 2a_n + 3\) (equilibrium value \(c = -3\)) gives
next term \(+\,3\) \(=\) 2 \(\times\) current term \(+\,3\)
\(a_{n+1} + 3 = 2\left(a_n + 3\right)\)
\(a_1 + 3 = 4,\quad a_2 + 3 = 8,\quad a_3 + 3 = 16\)
Key idea
Subtract the characteristic equation \(c = pc + q\) from the recurrence relation \(a_{n+1} = p a_n + q\), side by side (left side minus left side, right side minus right side). The number added, \(q\), cancels out, and only \(a_{n+1} - c = p(a_n - c)\) is left. So the sequence of gaps \(\{a_n - c\}\), each term minus the equilibrium value \(c\), is a geometric sequence that just multiplies by \(p\) each time. The goal of this rewrite is to turn a hard-to-handle recurrence relation that mixes in an addition into a familiar geometric sequence. In the example, \(c = -3\), so the gap is \(a_n - (-3) = a_n + 3\), and it goes \(4,\ 8,\ 16,\ \dots\), doubling each time as expected.
General term (characteristic equation case)
Graph
Standard notation (the usual math form)
\(a_n\) \(=\) \((a_1 - c)\) \(\times\) \(p^{n-1}\) \(+\) \(c\)
In words (symbols replaced with words)
④ \(a_n\): \(n\)th term (general term) \(=\) ① \(a_1 - c\): gap between the first term and the equilibrium value \(\times\) ② \(p^{n-1}\): the multiplier \(p\) multiplied \(n-1\) times \(+\) ③ \(c\): equilibrium value
The formula in words
① Multiply the \(a_1 - c\): gap between the first term and the equilibrium value by
② \(p^{n-1}\): the multiplier \(p\) multiplied \(n-1\) times , add back the
③ \(c\): equilibrium value ,
④ and you get the \(a_n\): \(n\)th term (general term)
Quick example
With first term \(a_1 = 1\) and the recurrence relation \(a_{n+1} = 2a_n + 3\) (equilibrium value \(c = -3\)), the general term is
\(n\)th term \(=\) gap \(1 - (-3) = 4\) \(\times\) \(2^{n-1}\) \(+\) equilibrium value \(-3\)
\(a_n = \left(1 - (-3)\right) \times 2^{n-1} + (-3) = 4 \cdot 2^{n-1} - 3\)
\(a_1 = 4 \times 1 - 3 = 1,\quad a_2 = 4 \times 2 - 3 = 5,\quad a_3 = 4 \times 4 - 3 = 13\)
Key idea
The geometric sequence \(\{a_n - c\}\) from the rewrite has first term \(a_1 - c\) and common ratio \(p\), so by the general-term formula for geometric sequences, \(a_n - c = (a_1 - c)p^{n-1}\). Finally, add back the \(c\) you subtracted (move it to the other side), and you get this general term. When \(|p| < 1\) (\(p\) is between \(-1\) and \(1\)), \(p^{n-1}\) gets closer to 0 as \(n\) grows, so \(a_n\) gets closer and closer to the equilibrium value \(c\) (it converges). When the sequence converges, this calculator shows \(c\) as the limit.
When \(p = 1\) (arithmetic sequence)
Standard notation (the usual math form)
\(a_n\) \(=\) \(a_1\) \(+\) \((n-1)q\)
In words (symbols replaced with words)
③ \(a_n\): \(n\)th term (general term) \(=\) ① \(a_1\): first term \(+\) ② \((n-1)q\): the common difference \(q\) added \(n-1\) times
The formula in words
① When \(p = 1\), the recurrence relation is \(a_{n+1} = a_n + q\) (it just adds \(q\) each time). So add to the \(a_1\): first term the
② \((n-1)q\): the common difference \(q\) added \(n-1\) times ,
③ and you get the \(a_n\): \(n\)th term (general term)
Quick example
With first term \(a_1 = 5\) and the recurrence relation \(a_{n+1} = a_n + 3\) (an arithmetic sequence with common difference 3), the general term and term 4 are
\(n\)th term \(=\) first term (5) \(+\) \(3\) added \(n-1\) times
\(a_n = 5 + (n-1) \times 3 = 3n + 2\)
\(a_4 = 3 \times 4 + 2 = 14\)
Key idea
When \(p = 1\), the denominator \(1 - p\) in the characteristic equation becomes 0, so the equilibrium value cannot be used. Instead, the recurrence relation just adds the same number \(q\) each time, so the sequence is simply an arithmetic sequence with common difference \(q\). From term 1 to term \(n\), you add \(q\) as many times as there are gaps between terms: \(n-1\) times (from term 1 to term 4 is 3 times; counting it as \(n\) times is a common mistake).
When \(q = 0\) (geometric sequence)
Standard notation (the usual math form)
\(a_n\) \(=\) \(a_1\) \(\times\) \(p^{n-1}\)
In words (symbols replaced with words)
③ \(a_n\): \(n\)th term (general term) \(=\) ① \(a_1\): first term \(\times\) ② \(p^{n-1}\): the common ratio \(p\) multiplied \(n-1\) times
The formula in words
① When \(q = 0\), the recurrence relation is \(a_{n+1} = p a_n\) (it just multiplies by \(p\) each time). So multiply the \(a_1\): first term by
② \(p^{n-1}\): the common ratio \(p\) multiplied \(n-1\) times ,
③ and you get the \(a_n\): \(n\)th term (general term)
Quick example
With first term \(a_1 = 3\) and the recurrence relation \(a_{n+1} = 2a_n\) (a geometric sequence with common ratio 2), the general term and term 4 are
\(n\)th term \(=\) first term (3) \(\times\) \(2^{n-1}\)
\(a_n = 3 \times 2^{n-1}\)
\(a_4 = 3 \times 2^{3} = 3 \times 8 = 24\)
Key idea
When \(q = 0\), the recurrence relation just multiplies by the same number \(p\) each time, so the sequence is simply a geometric sequence with common ratio \(p\). For the same reason as in the arithmetic case, you multiply \(n-1\) times. In fact, if you set \(q = 0\) in the general term for the characteristic equation case, the equilibrium value is \(c = 0\), and \(a_n = (a_1 - 0)p^{n-1} + 0 = a_1 p^{n-1}\). So this formula is a special case of that one.
For the first-order recurrence relation \(a_{n+1} = p a_n + q\), use the solution of the characteristic equation \(x = px + q\) (the equilibrium value \(c = \dfrac{q}{1-p}\)) to rewrite it as \(a_{n+1} - c = p(a_n - c)\). The sequence of gaps \(\{a_n - c\}\) is then geometric with common ratio \(p\), which gives the general term \(a_n = (a_1 - c)p^{n-1} + c\). If \(p = 1\), it is an arithmetic sequence; if \(q = 0\), it is a geometric sequence.

Symbols and terms

Symbols

\(a_n\) a sub n The \(n\)th term of the sequence, counting from the start. The letter \(a\) is often used for sequences (said to be because it is the first letter of the alphabet). The small subscript \(n\) at the lower right tells which position it is.
\(a_{n+1}\) a sub n plus one The term right after the \(n\)th term, that is, term \(n+1\). In a recurrence relation it plays the role of "the next term after the current term \(a_n\)".
\(a_1\) a sub one The first term of the sequence. A recurrence relation is a rule that makes the next term from the current one, so the sequence is not fixed until its starting point, the first term, is set.
\(n\) en The position number of a term (how far from the start). By custom it is \(n\), for "number". It takes the values 1, 2, 3, … (natural numbers).
\(p\) pee The constant that multiplies the current term \(a_n\). It plays the role of the common ratio of a geometric sequence. If it is between \(-1\) and \(1\), the sequence converges to the equilibrium value.
\(q\) cue The constant added after multiplying. It plays the role of the common difference of an arithmetic sequence. By custom, \(q\) is used as the letter after \(p\).
\(c\) cee The solution of the characteristic equation \(x = px + q\) (the equilibrium value). The letter \(c\) comes from "constant". It is a special value: once a term equals it, the next term stays the same. It is also where a converging sequence ends up.
\(\{a_n\}\) the sequence a sub n A way to write the whole sequence made of the terms \(a_n\). The curly braces say "all of \(a_1, a_2, a_3, \dots\) taken together".
\(p^{n-1}\) p to the power of n minus one \(p\) multiplied by itself \(n-1\) times (a power). The small number at the upper right (the exponent) tells how many times to multiply. From term 1 to term \(n\) you multiply by the common ratio \(n-1\) times, which is why this form appears in the general term.
\(\displaystyle\lim_{n\to\infty} a_n\) the limit of a sub n as n approaches infinity The value \(a_n\) approaches as \(n\) grows without bound (the limit). \(\lim\) is the first three letters of "limit". This calculator shows the limit when the sequence converges.

Terms

sequence Numbers lined up in order. Each number is called a term, and terms are numbered, as in \(a_1, a_2, a_3, \dots\).
term Each single number in a sequence. The one in position \(n\) from the start is called the \(n\)th term.
first term The first term \(a_1\) of a sequence. It is the starting point when a recurrence relation defines a sequence.
recurrence relation (recursive formula) A formula for the rule that makes the next term from the current term. For example, \(a_{n+1} = 2a_n + 3\) is the rule "the next term is the current term doubled, plus 3". Together with the first term, it fixes the whole sequence.
first-order recurrence relation A recurrence relation written with only two neighboring terms (\(a_n\) and \(a_{n+1}\)). The \(a_{n+1} = p a_n + q\) on this page is the typical form. One with three terms \(a_n,\ a_{n+1},\ a_{n+2}\) is called a second-order recurrence relation and is solved differently.
general term (explicit formula) The \(n\)th term written directly as a formula in \(n\). For example, once you have \(a_n = 4 \cdot 2^{n-1} - 3\), even term 100 takes one step: just put in \(n = 100\).
arithmetic sequence A sequence where the difference between neighboring terms is always the same (it adds the same number each time). \(5, 8, 11, 14, \dots\) is an arithmetic sequence with common difference 3. It is the case \(p = 1\) of the recurrence relation.
common difference The fixed number an arithmetic sequence adds each time. In the recurrence relation on this page, \(q\) plays this role when \(p = 1\).
geometric sequence A sequence where the ratio between neighboring terms is always the same (it multiplies by the same number each time). \(3, 6, 12, 24, \dots\) is a geometric sequence with common ratio 2. It is the case \(q = 0\) of the recurrence relation.
common ratio The fixed number a geometric sequence multiplies by each time. In the recurrence relation on this page, \(p\) plays this role.
characteristic equation The equation \(x = px + q\) you get by replacing both \(a_{n+1}\) and \(a_n\) in the recurrence relation with the same letter \(x\) (also called the fixed-point equation). Its solution (the equilibrium value) lets you rewrite the recurrence relation as a geometric sequence.
equilibrium value The solution \(c = \dfrac{q}{1-p}\) of the characteristic equation. It is the point where the sequence stops moving: once a term equals it, the next term stays the same. When the sequence converges, it is also where the sequence ends up (the limit).
fixed point A value that does not change when you apply the rule. For a recurrence relation, the equilibrium value \(c\) is the fixed point, since \(c = pc + q\). In college math, recurrence relations and repeated functions are studied from this point of view.
converge As \(n\) grows, the terms get closer and closer to one fixed value. This recurrence relation converges to the equilibrium value \(c\) when \(|p| < 1\) (\(p\) is between \(-1\) and \(1\)).
limit The value a converging sequence approaches. It is written \(\displaystyle\lim_{n\to\infty} a_n\). Limits are studied in depth in calculus, but thinking of it as "the destination the terms keep getting closer to" is enough here.
diverge To not converge. This covers terms that grow without bound (or fall without bound) and terms that swing back and forth without settling on one value. This recurrence relation diverges when \(|p| > 1\), unless it starts exactly at the equilibrium value.

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back to review these topics is the fastest way forward.

What a sequence is (Algebra 1)
  • Knowing that a sequence is numbers lined up in order, and \(a_n\) is "the \(n\)th number from the start (the \(n\)th term)"
  • Being able to read expressions in subscripts (for example, \(a_{n+1}\) is "the term after the \(n\)th term")
Arithmetic and geometric sequences (Algebra 1 and 2)
  • Being able to use the general term of an arithmetic sequence (add the same number each time), \(a_n = a_1 + (n-1)d\)
  • Being able to use the general term of a geometric sequence (multiply by the same number each time), \(a_n = a_1 r^{n-1}\)
  • Knowing why you add or multiply \(n-1\) times, not \(n\) times (it is the number of gaps between terms)
Solving linear equations (Grades 7–8)
  • Being able to solve an equation like \(x = 2x + 3\) by moving terms to one side
  • Knowing that you may subtract the same thing from both sides of an equation (used when subtracting the characteristic equation, side by side)
Powers and exponents (Grade 6 to Algebra 1)
  • Knowing that the small number at the upper right (the exponent) tells how many times to multiply, as in \(2^{3} = 2 \times 2 \times 2 = 8\)
  • Knowing the basic exponent rules, such as \(2^{0} = 1\)
Working with fractions (Grades 5–7)
  • Being able to multiply, divide and simplify fractions
  • Being comfortable leaving answers as fractions (not being put off by an answer like \(\dfrac{381}{64}\))

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to find the nth term with the general term (characteristic equation case)
First term a1 1
Coefficient p 2
Constant q 3
Term number n 10
Equilibrium value c = q/(1−p) =B3/(1-B2)
Gap between first term and c, a1−c =B1-B5
nth term (a1−c)×p^(n−1)+c =B6*B2^(B4-1)+B5
Table that follows the recurrence relation step by step (terms 1–10)
Coefficient p 2
Constant q 3
Term 1, a1 1
Term 2 =B1*B3+B2
Term 3 =B1*B4+B2
Term 4 =B1*B5+B2
Term 5 =B1*B6+B2
Term 6 =B1*B7+B2
Term 7 =B1*B8+B2
Term 8 =B1*B9+B2
Term 9 =B1*B10+B2
Term 10 =B1*B11+B2
Table to find the nth term when p = 1 (arithmetic sequence)
First term a1 5
Common difference q 3
Term number n 4
nth term a1+(n−1)q =B1+(B3-1)*B2
Table to find the nth term when q = 0 (geometric sequence)
First term a1 3
Common ratio p 2
Term number n 4
nth term a1×p^(n−1) =B1*B2^(B3-1)
After pasting, the upper rows (first term and coefficients) are the inputs, and the lower rows show the calculated results. "^" is a power and "*" is multiplication.
The first table uses the general term to find term 10 of the sequence with first term 1 and recurrence relation a(n+1) = 2a(n) + 3. The equilibrium value c is −3, and the answer is 2045. The formulas in this table do not work when p = 1 (1−p becomes 0, and you would divide by 0). In that case, use the third table.
The second table calculates the same sequence step by step, exactly as the recurrence relation says, so you can check that term 10 is 2045, the same as in the first table.
The third table is an example of the arithmetic case (first term 5, common difference 3, term 4 = 14), and the fourth table is an example of the geometric case (first term 3, common ratio 2, term 4 = 24).

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to find the nth term with the general term (characteristic equation case)
First term a1 1
Coefficient p 2
Constant q 3
Term number n 10
Equilibrium value c = q/(1−p) =B3/(1-B2)
Gap between first term and c, a1−c =B1-B5
nth term (a1−c)×p^(n−1)+c =B6*B2^(B4-1)+B5
Table that follows the recurrence relation step by step (terms 1–10)
Coefficient p 2
Constant q 3
Term 1, a1 1
Term 2 =B1*B3+B2
Term 3 =B1*B4+B2
Term 4 =B1*B5+B2
Term 5 =B1*B6+B2
Term 6 =B1*B7+B2
Term 7 =B1*B8+B2
Term 8 =B1*B9+B2
Term 9 =B1*B10+B2
Term 10 =B1*B11+B2
Table to find the nth term when p = 1 (arithmetic sequence)
First term a1 5
Common difference q 3
Term number n 4
nth term a1+(n−1)q =B1+(B3-1)*B2
Table to find the nth term when q = 0 (geometric sequence)
First term a1 3
Common ratio p 2
Term number n 4
nth term a1×p^(n−1) =B1*B2^(B3-1)
The same formulas as in Excel work as is. Copy the whole table, paste it into cell A1, and replace the first term and coefficients with your own numbers.

How to calculate it in Python

from fractions import Fraction

first_term = Fraction(1)    # first term a1 (fractions work too, e.g. Fraction(1, 2))
coefficient = Fraction(2)   # coefficient p (multiplies a_n)
constant = Fraction(3)      # constant q (added)
term_number = 10            # term number n to find

# Calculate terms 1 to 10 in order, following the recurrence relation
terms = [first_term]
for _ in range(9):
    terms.append(coefficient * terms[-1] + constant)
print("Terms 1-10:", ", ".join(str(t) for t in terms))

# nth term (apply the recurrence relation n-1 times)
nth_term = first_term
for _ in range(term_number - 1):
    nth_term = coefficient * nth_term + constant
print(f"Term {term_number}: {nth_term} (as a decimal: {float(nth_term)})")

# If p is not 1, the equilibrium value c = q/(1-p) also gives the general term
if coefficient != 1:
    fixed_point = constant / (1 - coefficient)
    start_diff = first_term - fixed_point
    print(f"Equilibrium value c: {fixed_point}")
    print(f"General term: a_n = ({start_diff})*({coefficient})^(n-1) + ({fixed_point})")
With the fractions module from the standard library, you can calculate with exact fractions and no decimal rounding error. This example is the sequence with first term 1 and recurrence relation a(n+1) = 2a(n) + 3. Running it prints terms 1 to 10 (1, 5, 13, …, 2045), term 10 = 2045, the equilibrium value −3, and the general term a_n = (4)*(2)^(n-1) + (-3) (simplified, 4×2^(n−1) − 3). Change the first term and coefficients and run it.

How to write it in LaTeX and other math languages (copy and paste)

First-order recurrence relation
aₙ₊₁ = p·aₙ + q
a_{n+1} = p a_n + q
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msub><mi>a</mi><mrow><mi>n</mi><mo>+</mo><mn>1</mn></mrow></msub>
    <mo>=</mo>
    <mi>p</mi>
    <msub><mi>a</mi><mi>n</mi></msub>
    <mo>+</mo>
    <mi>q</mi>
  </mrow>
</math>
a_(n+1) = p a_n + q
RSolve[{a[n + 1] == p a[n] + q, a[1] == a1}, a[n], n]
rsolve({a(n+1) = p*a(n) + q, a(1) = a1}, a(n));
a(n+1) = p*a(n) + q
a_(n+1) = p a_n + q
The characteristic equation and the equilibrium value
c = q/(1 − p)
c = \dfrac{q}{1-p}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>c</mi>
    <mo>=</mo>
    <mfrac>
      <mi>q</mi>
      <mrow><mn>1</mn><mo>&#x2212;</mo><mi>p</mi></mrow>
    </mfrac>
  </mrow>
</math>
c = q/(1-p)
c = q/(1 - p)
c := q/(1 - p);
c = q/(1 - p);
c = q/(1 − p)
Rewriting with the equilibrium value (making a geometric sequence)
aₙ₊₁ − c = p(aₙ − c)
a_{n+1} - c = p(a_n - c)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msub><mi>a</mi><mrow><mi>n</mi><mo>+</mo><mn>1</mn></mrow></msub>
    <mo>&#x2212;</mo><mi>c</mi>
    <mo>=</mo>
    <mi>p</mi>
    <mo>(</mo>
    <msub><mi>a</mi><mi>n</mi></msub>
    <mo>&#x2212;</mo><mi>c</mi>
    <mo>)</mo>
  </mrow>
</math>
a_(n+1) - c = p(a_n - c)
a[n + 1] - c == p (a[n] - c)
a(n+1) - c = p*(a(n) - c);
a(n+1) - c = p*(a(n) - c)
a_(n+1) − c = p(a_n − c)
General term (characteristic equation case)
aₙ = (a₁ − c)·pⁿ⁻¹ + c
a_n = (a_1 - c)p^{n-1} + c
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msub><mi>a</mi><mi>n</mi></msub>
    <mo>=</mo>
    <mo>(</mo>
    <msub><mi>a</mi><mn>1</mn></msub>
    <mo>&#x2212;</mo><mi>c</mi>
    <mo>)</mo>
    <msup><mi>p</mi><mrow><mi>n</mi><mo>&#x2212;</mo><mn>1</mn></mrow></msup>
    <mo>+</mo>
    <mi>c</mi>
  </mrow>
</math>
a_n = (a_1 - c)p^(n-1) + c
a[n_] := (a1 - c) p^(n - 1) + c
a := n -> (a1 - c)*p^(n-1) + c;
a_n = (a1 - c)*p^(n-1) + c;
a_n = (a_1 − c)p^(n−1) + c
When \(p = 1\) (arithmetic sequence)
aₙ = a₁ + (n − 1)q
a_n = a_1 + (n-1)q
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msub><mi>a</mi><mi>n</mi></msub>
    <mo>=</mo>
    <msub><mi>a</mi><mn>1</mn></msub>
    <mo>+</mo>
    <mo>(</mo><mi>n</mi><mo>&#x2212;</mo><mn>1</mn><mo>)</mo>
    <mi>q</mi>
  </mrow>
</math>
a_n = a_1 + (n-1)q
a[n_] := a1 + (n - 1) q
a := n -> a1 + (n-1)*q;
a_n = a1 + (n-1)*q;
a_n = a_1 + (n − 1)q
When \(q = 0\) (geometric sequence)
aₙ = a₁·pⁿ⁻¹
a_n = a_1 p^{n-1}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msub><mi>a</mi><mi>n</mi></msub>
    <mo>=</mo>
    <msub><mi>a</mi><mn>1</mn></msub>
    <msup><mi>p</mi><mrow><mi>n</mi><mo>&#x2212;</mo><mn>1</mn></mrow></msup>
  </mrow>
</math>
a_n = a_1 p^(n-1)
a[n_] := a1 p^(n - 1)
a := n -> a1*p^(n-1);
a_n = a1*p^(n-1);
a_n = a_1 p^(n−1)

How to have ChatGPT  do the calculation

You are an assistant for math calculations (sequences and recurrence relations). Do the following calculations by actually running Python code, and base your answer only on the numbers from the output (do not answer from mental math or guesses).

For the sequence defined by the first term a_1 = 1 and the recurrence relation a_(n+1) = 2·a_n + 3, show each of the following.
1. The solution of the characteristic equation x = 2x + 3 (the equilibrium value c)
2. The general term a_n (with the steps that use c to rewrite it as a geometric sequence)
3. The values of terms 1 to 10, and the value of term 10
4. Does this sequence converge? (If it does, give the limit too.)

In Python, use the fractions module from the standard library to calculate exactly, and show the formulas you used and the numbers from the output.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.