Previous Page Next Page Contents

ithprime -- the i-th prime number

Introduction

ithprime(i) returns the i-th prime number.

Call(s)

ithprime(i)

Parameters

i - an arithmetical expression

Returns

a prime number or an unevaluated call to ithprime

Related Functions

ifactor, igcd, ilcm, isprime, nextprime, numlib::prevprime

Details

Example 1

The first 10 prime numbers:

>> ithprime(i) $ i = 1..10
                    2, 3, 5, 7, 11, 13, 17, 19, 23, 29

A larger prime:

>> ithprime(123456)
                                  1632899

Symbolic arguments lead to an unevaluated call:

>> ithprime(i)
                                ithprime(i)

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000