Prime Counting - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


NumberTheory

  

PrimeCounting

  

number of prime numbers less than a number

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

PrimeCounting(x)

pi(x)

Parameters

x

-

positive real number

Description

• 

The PrimeCounting(x) command computes the number of prime numbers less than or equal to x.

• 

pi is an alias of PrimeCounting.

Examples

withNumberTheory:

PrimeCounting1

0

(1)

piπ

2

(2)

PrimeCounting10000

1229

(3)

numelemsselectisprime,seq1..10000

1229

(4)

The prime counting function is approximated by Lix and xlnx.

plotPrimeCountingx,Lix,xlnx,x=1..500,legend=pix,Lix,xlnx

Compatibility

• 

The NumberTheory[PrimeCounting] command was introduced in Maple 2016.

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

See Also

ithprime

NumberTheory