numtheory(deprecated)/nthconver - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : numtheory(deprecated)/nthconver

numtheory(deprecated)

  

nthconver

  

the nth convergent of simple or regular continued fraction

  

nthdenom

  

the nth denominator of simple or regular continued fraction

  

nthnumer

  

the nth numerator of simple or regular continued fraction

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

nthconver(cf, n)

nthdenom(cf, n)

nthnumer(cf, n)

Parameters

cf

-

list of the first m ( > n) partial quotients (i.e. a simple continued fraction expansion: [a_0, a_1,a_2, ..., a_n, ...] or a regular continued fraction: [b_0, [a_1,b_1], [a_2,b_2],...,[a_n,b_n],...]) (in either list or fraction form)

n

-

integer

Description

• 

Important: The numtheory package has been deprecated.  Use the superseding commands NumberTheory[ContinuedFraction][Convergent], NumberTheory[ContinuedFraction][Denominator], and NumberTheory[ContinuedFraction][Numerator] instead.

• 

The nthconver function returns the nth convergent (p_n/q_n = [a_0, a_1,a_2, ..., a_n] of a simple continued fraction cf or p_n/q_n = [b_0, [a_1,b_1], [a_2,b_2],...,[a_n,b_n]] of a regular continued fraction cf).

• 

The nthdenom function returns the nth denominator (q_n in p_n/q_n = [a_0, a_1,a_2, ..., a_n] of a simple continued fraction cf or q_n in p_n/q_n = [b_0, [a_1,b_1], [a_2,b_2],...,[a_n,b_n]] of a regular continued fraction cf).

• 

The nthnumer function returns the nth numerator (p_n in p_n/q_n = [a_0, a_1,a_2, ..., a_n] of a simple continued fraction cf or p_n in p_n/q_n = [b_0, [a_1,b_1], [a_2,b_2],...,[a_n,b_n]] of a regular continued fraction cf).

• 

These functions are part of the numtheory package, and so can be used in the form nthconver(..) only after performing the command with(numtheory) or with(numtheory,nthconver).  The function can always be accessed in the long form numtheory[nthconver](..).

Examples

Important: The numtheory package has been deprecated.  Use the superseding commands NumberTheory[ContinuedFraction][Convergent], NumberTheory[ContinuedFraction][Denominator], and NumberTheory[ContinuedFraction][Numerator] instead.

withnumtheory:

cfcfracπ

cf3+17+115+11+1292+11+11+11+12+11+13+...

(1)

nthconvercf,10

42729431360120

(2)

evalf

3.141592654

(3)

nthdenomcf,10

1360120

(4)

nthnumercf,10

4272943

(5)

cfracexpx

1+x1x2+x3x2+x5x2+x7x2+x9x2+...

(6)

nthnumer,7

x4+16x3+120x2+480x+840

(7)

nthdenom,7

4x3+60x2360x+840

(8)

nthconver,7

x4+16x3+120x2+480x+8404x3+60x2360x+840

(9)

See Also

convert/confrac

numtheory(deprecated)[cfrac]

numtheory(deprecated)[cfracpol]