PRODUCTS
Products Overview
Mathematica
Mathematica for Students
Mathematica Home Edition
Wolfram
CDF Player
(free download)
Computable Document Format (CDF)
web
Mathematica
grid
Mathematica
Wolfram
Workbench
Wolfram
SystemModeler
Wolfram
Finance Platform
Mathematica
Add-Ons
Wolfram|Alpha Products
SOLUTIONS
Solutions Overview
Engineering
Aerospace Engineering & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Materials Science
Mechanical Engineering
Operations Research
Optics
Petroleum Engineering
Biotechnology & Medicine
Bioinformatics
Medical Imaging
Finance, Statistics & Business Analysis
Actuarial Sciences
Data Analysis & Mining
Econometrics
Economics
Financial Engineering & Mathematics
Financial Risk Management
Statistics
Software Engineering & Content Delivery
Authoring & Publishing
Interface Development
Software Engineering
Web Development
Science
Astronomy
Biological Sciences
Chemistry
Environmental Sciences
Geosciences
Social & Behavioral Sciences
Design, Arts & Entertainment
Game Design, Special Effects & Generative Art
Education
STEM Education Initiative
Higher Education
Community & Technical College Education
Primary & Secondary Education
Students
Technology
Computable Document Format (CDF)
High-Performance & Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
Merchandise
SUPPORT
Support Overview
Knowledge Base
Learning Center
Community & Forums
Training
Does My Site Have a License?
Wolfram User Portal
COMPANY
About Wolfram Research
News & Events
Wolfram Blog
Partnerships
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
All Sites
Wolfram|Alpha
Demonstrations Project
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Media
Wolfram
Tones
Wolfram Science
Stephen Wolfram
DOCUMENTATION CENTER SEARCH
New to
Mathematica
?
Find your learning path
»
Mathematica
>
Mathematics and Algorithms
>
Calculus
>
Discrete Calculus
>
LinearRecurrence
>
Mathematica
>
Mathematics and Algorithms
>
Discrete Mathematics
>
Discrete Calculus
>
LinearRecurrence
>
BUILT-IN MATHEMATICA SYMBOL
FindLinearRecurrence
RecurrenceTable
DifferenceRoot
Accumulate
ListConvolve
CellularAutomaton
ExponentialMovingAverage
NestList
Fibonacci
See Also »
|
Discrete & Integer Data
Discrete Calculus
Discrete Mathematics
Integer Sequences
Recurrence and Sum Functions
Summary of New Features in 7.0
New in 7.0: Alphabetical Listing
New in 7.0: Mathematics & Algorithms
More About »
LinearRecurrence
LinearRecurrence
gives the sequence of length
n
obtained by iterating the linear recurrence with kernel
ker
starting with initial values
init
.
LinearRecurrence
yields terms
through
in the linear recurrence sequence.
MORE INFORMATION
The
ker
and
init
can involve arbitrary symbolic expressions, as well as arrays.
The initial list
init
must be at least as long as the kernel list
ker
.
If
init
is longer than
ker
, only the last
Length
[
ker
]
elements are used.
LinearRecurrence
iterates the recurrence equation
with initial conditions
, ...,
.
When coefficients
and initial values
are arrays, then the iterated recurrence is interpreted as
with dot products of coefficient and values.
If the initial values
have dimensions
then the coefficients
must either be scalar or must have dimensions
.
EXAMPLES
CLOSE ALL
Basic Examples
(3)
Solve an initial-value problem for a first-order difference equation with kernel
:
Find the first few Fibonacci numbers:
In[1]:=
Out[1]=
Solve an initial-value problem for a first-order difference equation with kernel
:
In[1]:=
Out[1]=
Find the first few Fibonacci numbers:
In[1]:=
Out[1]=
In[2]:=
Out[2]=
Scope
(2)
LinearRecurrence
works on symbolic kernels and initial values:
LinearRecurrence
works on arrays:
Generalizations & Extensions
(2)
Generate a subset of values from a given range:
Get only the last value from an iteration:
Applications
(1)
Generate recursive sequences, including a Padovan sequence:
Pell numbers:
Pell-Lucas numbers:
Perrin sequence:
Properties & Relations
(1)
RSolve
finds a symbolic solution for difference equations:
LinearRecurrence
generates a procedural solution:
Possible Issues
(1)
Initial values are longer than the kernel:
Only the last terms are used:
Neat Examples
(1)
SEE ALSO
FindLinearRecurrence
RecurrenceTable
DifferenceRoot
Accumulate
ListConvolve
CellularAutomaton
ExponentialMovingAverage
NestList
Fibonacci
MORE ABOUT
Discrete & Integer Data
Discrete Calculus
Discrete Mathematics
Integer Sequences
Recurrence and Sum Functions
Summary of New Features in 7.0
New in 7.0: Alphabetical Listing
New in 7.0: Mathematics & Algorithms
New in 7