This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Lists and Matrices / List Construction  /
Range

  • Range[ imax ] generates the list 1, 2, ... , imax .
  • Range[ imin , imax ] generates the list imin , ... , imax . Range[ imin , imax , di ] uses step di.
  • Example: Range[4].
  • The arguments to Range need not be integers.
  • Range starts from imin, and successively adds increments of di until the result is greater than imax.
  • Range[0, 1, .3].
  • Range[x, x+2].
  • Range uses the standard Mathematica iteration specification, as applied to a single variable.
  • See the Mathematica book: Section 1.8.3.
  • See also: Table, Interval, CharacterRange.

    Further Examples

    Here are lists of integers from 1 to 12, 5 to , and to conuting by threes.

    In[1]:=

    Out[1]=

    In[2]:=

    Out[2]=

    In[3]:=

    Out[3]=