Function Repository Resource:

GeometricProgression

Source Notebook

Produce a set of values in geometric progression

Contributed by: Pedro Cabral

ResourceFunction["GeometricProgression"][n,r]

produces a geometric progression of n terms with ratio r starting at 1.

ResourceFunction["GeometricProgression"][n,r,a]

produces a geometric progression starting at a.

Examples

Basic Examples (3) 

Compute the first 10 terms of a geometric progression with ratio :

In[1]:=
ResourceFunction["GeometricProgression"][10, 2/3]
Out[1]=

Create a ListLinePlot of different geometric progressions:

In[2]:=
ListLinePlot[{ResourceFunction["GeometricProgression"][10, 11/6], ResourceFunction["GeometricProgression"][10, 2], ResourceFunction["GeometricProgression"][10, \[Pi]]}]
Out[2]=

Get a geometric sequence of 30 terms with ratio 2, starting at 20:

In[3]:=
ResourceFunction["GeometricProgression"][30, 2, 20]
Out[3]=

Scope (2) 

GeometricProgression can handle complex values:

In[4]:=
ResourceFunction["GeometricProgression"][5, \[Phi]^2 - 4/2 I + \[Pi]]
Out[4]=

GeometricProgression can handle symbols and constants:

In[5]:=
ResourceFunction["GeometricProgression"][8, x, Pi]
Out[5]=

Publisher

Pedro Cabral

Version History

  • 1.0.0 – 09 September 2020

License Information