Close
Close window
nextprime - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

nextprime

determine the next largest prime

prevprime

determine the next smallest prime

Calling Sequence

nextprime(n)

prevprime(n)

Parameters

n

-

integer

Description

The nextprime function returns the smallest prime that is larger than n. The prevprime function returns the largest prime that is less than n.

Examples

>

nextprime1

2

(1)
>

nextprime0

2

(2)
>

prevprime2

>

nextprime25

29

(3)
>

prevprime3

2

(4)
>

prevprime25

23

(5)
>

nextprime31243

31247

(6)
>

prevprime2338714

2338703

(7)
>

nextprime26

67

(8)


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /