ith rational number - Maple Help

Home : Support : Online Help : Mathematics : Group Theory : Number Theory : numtheory/ithrational

numtheory[ithrational] - ith rational number

 Calling Sequence ithrational(i)

Parameters

 i - integer

Description

 • The function ithrational generates the ith positive rational number as illustrated by the first example below. That is, this function generates all positive rational numbers in a non-repeating sequence.
 • The ordering of the rationals satisfies ithrational(2^(i-1)) = 1/i and ithrational(2^i-1) = i.
 • The command with(numtheory,ithrational) allows the use of the abbreviated form of this command.

Examples

 > $\mathrm{with}\left(\mathrm{numtheory}\right):$
 > $\mathrm{seq}\left(\mathrm{ithrational}\left(i\right),i=0..10\right)$
 ${0}{,}{1}{,}\frac{{1}}{{2}}{,}{2}{,}\frac{{1}}{{3}}{,}\frac{{3}}{{2}}{,}\frac{{2}}{{3}}{,}{3}{,}\frac{{1}}{{4}}{,}\frac{{4}}{{3}}{,}\frac{{3}}{{5}}$ (1)
 > $\mathrm{seq}\left(\mathrm{ithrational}\left({2}^{i}-1\right),i=1..10\right)$
 ${1}{,}{2}{,}{3}{,}{4}{,}{5}{,}{6}{,}{7}{,}{8}{,}{9}{,}{10}$ (2)
 > $\mathrm{seq}\left(\mathrm{ithrational}\left({2}^{i-1}\right),i=1..10\right)$
 ${1}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{3}}{,}\frac{{1}}{{4}}{,}\frac{{1}}{{5}}{,}\frac{{1}}{{6}}{,}\frac{{1}}{{7}}{,}\frac{{1}}{{8}}{,}\frac{{1}}{{9}}{,}\frac{{1}}{{10}}$ (3)
 > $\mathrm{ithrational}\left(1234321\right)$
 $\frac{{7461}}{{5875}}$ (4)