aarjaneiro/planetmath huggingface dataset:
Pierpont prime

Pierpont prime

A

Pierpont prime

is a

prime number

of the form

p

=

1

+

2

x

⁢

3

y

with

-

1

<

y

≤

x

. If

x

>

0

and

y

=

0

then the resulting prime is a

Fermat prime

. In the Erdős-Selfridge

classification

of primes (

http://planetmath.org/ErdHosSelfridgeClassificationOfPrimes

), the Pierpont primes are class 1-. The first few Pierpont primes are 2, 3, 5, 7, 13, 17, 19, 37, 73, 97, 109, 163, 193, 257, 433, 487, 577, 769, etc., listed in A005109 of Sloane’s OEIS.

In 1988, Gleason showed that an

n

-sided

regular polygon

can be constructed with ruler and

compass

if

n

is the product of two Pierpont primes.

Title

Pierpont prime

Canonical name

PierpontPrime

Date of creation

2013-03-22 16:52:39

Last modified on

2013-03-22 16:52:39

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

4

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A41

Generated on Fri Feb 9 15:16:59 2018 by

LaTeXML
Pillai prime

Pillai prime

If for a given prime

p

we can find an

integer

n

>

0

such that

n

!

≡

-

1

mod

p

but

p

≢

1

mod

n

then

p

is a called a

Pillai prime

. These are listed in A063980 of Sloane’s OEIS. Sarinya Intaraprasert proved that there are infinitely many Pillai primes. The first few are 23, 29, 59, 61, 67, 71, 79, 83, 109, 137, 139, 149, 193, …

References

1

R. K. Guy,

Unsolved Problems in

Number Theory

New York: Springer-Verlag 2004: A2

Title

Pillai prime

Canonical

name

PillaiPrime

Date of creation

2013-03-22 16:33:14

Last modified on

2013-03-22 16:33:14

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

5

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A41

Generated on Fri Feb 9 15:17:00 2018 by

LaTeXML
Pollard’s p-1 algorithm

Pollard’s

p

-

1

algorithm

Pollard’s

p

-

1

method

is an

integer factorization

algorithm

devised by John Pollard in 1974 to take advantage of Fermat’s little

theorem

. Theoretically,

trial division

always returns a result (though of course in practice the computing engine’s resources could be exhausted or the user might not to be around to care for the result). Pollard’s

p

-

1

algorithm, on the other hand, was designed from the outset to cope with the possibility of failure to return a result.

Choose a test cap

B

and call Pollard’s

p

-

1

algorithm with a

positive integer

.

1.

Use a simple method (such as the

sieve of Eratosthenes

) to find primes

p

<

B

, or even

probable primes

.

2.

Choose an

integer

a

coprime

to

n

. If

n

is odd (which can be tested easily enough by looking at the least significant bit) then one possible choice is

a

=

2

. For even

n

, we could choose

⌊

n

⌋

+

1

.

3.

Find the exponent

e

such that

p

e

≤

B

. Then for each

p

<

B

, compute

b

=

a

p

e

mod

n

and see if

1

<

gcd

⁡

(

b

-

1

,

n

)

<

n

. If that’s the case, return those results of the

greatest common divisor

function

, exit.

4.

If the GCD function consistently returned 1s, one could try a higher test cap and try again from step 1.

5.

If the GCD function consistently returned

n

itself, this could indicate that

a

is in fact not coprime to

n

, in which case one could try going back to step 2 to pick a different

a

.

6.

Throw a failure exception.

For example,

n

=

221

. Of course it’s overkill to use the Pollard

p

-

1

algorithm on such a small number, but it helps to keep the example simple. Since the running time of the algorithm is exponential, Crandall and Pomerance suggest picking small

B

. So for this example let’s pick

B

=

10

, the primes are then 2, 3, 5, 7, and the exponents are 3, 2, 1, 1. Since 221 is odd, we try

a

=

2

. So we see that

2

8

mod

221

=

35

, and

gcd

⁡

(

34

,

221

)

=

17

. We also see

3

9

mod

221

=

14

and

gcd

⁡

(

13

,

221

)

=

13

.

Multiplication

immediately verifies that

13

×

17

=

221

.

As of version 5.2, Pollard’s

p

-

1

algorithm is one of the methods used by

Mathematica

’s

FactorInteger

function after ferreting out small factors by trial division.

References

1

R. Crandall & C. Pomerance,

Prime Numbers

: A Computational Perspective

, Springer, NY, 2001: 5.4.1

Title

Pollard’s

p

-

1

algorithm

Canonical

name

PollardsP1Algorithm

Date of creation

2013-03-22 16:43:47

Last modified on

2013-03-22 16:43:47

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

8

Author

PrimeFan (13766)

Entry type

Algorithm

Classification

msc 11A41

Synonym

Pollard

p

-

1

algorithm

Synonym

Pollard’s p minus 1 algorithm

Synonym

Pollard p minus 1 algorithm

Synonym

Pollard

p

-

1

method

Synonym

Pollard’s p minus 1 method

Synonym

Pollard p minus 1 method

Synonym

Pollard’s

p

-

1

method

Generated on Fri Feb 9 15:17:02 2018 by

LaTeXML
Pollard’s ρ algorithm

Pollard’s

ρ

algorithm

Pollard’s

ρ

algorithm

is an

integer factorization

algorithm devised by John Pollard in 1975 to take advantage of Floyd’s cycle-finding algorithm and

pseudorandom number

generation. Theoretically,

trial division

always returns a result (though of course in practice the computing engine’s resources could be exhausted or the user might not to be around to care for the result). Pollard’s

ρ

algorithm, on the other hand, was designed from the outset to cope with the possibility of failure to return a result.

It can be left up to the implementer to choose a

function

f

⁢

(

x

)

with a

finite set

of values that can be guaranteed to become cyclic quickly enough after few iterations. Crandall and Pomerance recommend

f

⁢

(

x

)

=

x

2

+

a

mod

n

, where

n

is the number to be factored and

a

is a pseudorandom number chosen based on

n

.

Choose a function

f

⁢

(

x

)

per the given requirements and call Pollard’s

ρ

algorithm with

n

a

positive integer

.

1.

Choose random

a

and

b

from the ranges

1

<

a

<

(

n

-

3

)

and

0

<

b

<

(

n

-

1

)

and set

c

=

a

and

d

=

b

.

2.

Set

g

=

1

.

3.

While

g

=

=

1

and allowed number of iterations not exceeded, iterate

c

=

f

⁢

(

c

)

once and

d

=

f

⁢

(

d

)

twice and compute

g

=

G

⁢

C

⁢

D

⁢

(

c

-

d

,

n

)

. The implementer may choose to take the

absolute value

of

c

-

d

, though some implementations of GCD don’t mind being given

negative

arguments

.

4.

If

g

>

1

, it is a factor of

n

. Otherwise, the algorithm has failed.

Take for example,

n

=

42

. Suppose our dice give us

a

=

12

and

b

=

37

. I promise I didn’t choose these values consciously, but it happens that 37 does not change when input to

f

⁢

(

x

)

=

x

2

+

12

mod

42

! 12 will change however, giving a

sequence

that continues 0, 20, 13. At 13, we find that

37

-

13

=

24

, and computing

G

⁢

C

⁢

D

⁢

(

24

,

42

)

gives up 6, which is not a prime, but is easily enough taken care of by trial division. The factorization is therefore

42

=

2

⋅

3

⋅

7

.

To date, the most well-known success of this algorithm was when Pollard and Richard Brent factored 115792089237316195423570985008687907853269984665640564039457584007913129639937 (the eighth

Fermat number

) in less than two hours, which was an impressive feat in 1975 for a UNIVAC 1100/42. Today, Mathematica

running

on a Dell with Windows XP factors that number in about 12 seconds (Mathematica’s

FactorInteger

function has always used Pollard’s

ρ

algorithm as one of the algorithms it uses).

Title

Pollard’s

ρ

algorithm

Canonical name

PollardsrhoAlgorithm

Date of creation

2013-03-22 16:44:22

Last modified on

2013-03-22 16:44:22

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

5

Author

PrimeFan (13766)

Entry type

Algorithm

Classification

msc 11A41

Synonym

Pollard

ρ

algorithm

Synonym

Pollard’s rho algorithm

Synonym

Pollard rho algorithm

Generated on Fri Feb 9 15:17:04 2018 by

LaTeXML
Pratt certificate

Pratt certificate

A

Pratt certificate

for a given

integer

n

is a

primality certificate

in which the numbers allow verification of

primality

by using the converse of Fermat’s little theorem (or Lehmer’s theorem). Generating a Pratt certificate requires knowledge of the

prime factorization

of

n

-

1

(the primes

p

i

). Then, one must find a

witness

w

such that

w

n

-

1

≡

1

mod

n

but not

w

n

-

1

p

i

≡

1

mod

n

for any

i

≤

ω

⁢

(

n

-

1

)

(with

ω

⁢

(

x

)

being the

number of distinct prime factors function

). Pratt certificates typically include witnesses not just for

n

but also for the

prime factors

of

n

-

1

.

Because a Pratt certificate requires the factorization of

n

-

1

, it is generally only used for small numbers, with “small” being roughly defined as being less than about a billion. We’ll use a much smaller number for our example, one for which it would actually be faster to just perform

trial division

:

n

=

127

. We then have to factor 126, which gives us 2, 3, 3, 7. Choosing our witness

w

=

12

, we then see that

12

126

≡

1

mod

127

but

12

63

≡

-

1

mod

127

,

12

42

≡

107

mod

127

and

12

18

≡

8

mod

127

. Most

algorithms

for the Pratt certificate generally hard-code 2 as a

prime number

, but provide

certificates

for the other primes in the factorization. For this example we won’t bother to give certificates for 3 and 7.

Title

Pratt certificate

Canonical name

PrattCertificate

Date of creation

2013-03-22 18:53:06

Last modified on

2013-03-22 18:53:06

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

4

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A41

Generated on Fri Feb 9 15:17:06 2018 by

LaTeXML
primality

primality

A general dictionary would define

primality

as “the quality or condition of being a

prime number

.” In mathematics, it might be more useful to define primality as a

Boolean-valued function

that returns True if the input number is prime and False otherwise. Two examples: the primality of 47 is True; the primality of 42 is False.

It is not necessary to perform

integer factorization

to know the primality of a given

integer

, as there are various

congruences

and other

relations

which prime numbers

satisfy

but non-primes don’t; these can serve as

primality tests

. The primality of certain large numbers, such as the thirtieth

Fermat number

, has been determined even though all we know of its least

prime factor

is that it is less than the

square root

of the

composite

Fermat number. Before the primality of a large number is ascertained, it might be considered a

probable prime

. 1 is the only integer to be declared non-prime without a previously unknown factor being discovered.

Title

primality

Canonical name

Primality

Date of creation

2013-03-22 17:45:33

Last modified on

2013-03-22 17:45:33

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

6

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A41

Generated on Fri Feb 9 15:17:08 2018 by

LaTeXML
primality certificate

primality certificate

A

primality certificate

of an

integer

n

is a small set of numbers which enable one to quickly verify the

primality

of

n

by using the numbers in a

computation

specified by a given theorem. Doing the computations to verify the

certificate

should be much faster than performing any sort of

primality test

on the number.

Title

primality certificate

Canonical name

PrimalityCertificate

Date of creation

2013-03-22 18:53:03

Last modified on

2013-03-22 18:53:03

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

4

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A41

Generated on Fri Feb 9 15:17:09 2018 by

LaTeXML
primality testing

primality testing

Primality testing

is the evaluation of an

integer

to determine its

primality

, to see whether it is prime or

composite

without actually

factoring

it. Primality testing is often accomplished using

congruences

, such as from Fermat’s little

theorem

, but there are also other methods.

With small numbers, it is practical to use

integer factorization

to determine primality; this is not the case for larger numbers with a large least

prime factor

. For larger numbers, such as most

Mersenne numbers

, there are special

primality tests

which in the case of a composite input return only False without giving any idea as to any of the factors. In the case of the Mersenne numbers, the

Lucas-Lehmer primality test

is quite effective. For numbers of no particular special form, sophisticated

elliptic curve

tests can be used.

For practical purposes, primality testing might further have to be limited to answering whether a given number is a

probable prime

which could turn out to be a

pseudoprime

to a given base with further testing. In

Mathematica

, the primality

function

is

PrimeQ[n]

, which uses the strong Miller-Rabin primality test, which is thought to be infallible even for large numbers which Mathematica would not be able to factor.

In 2002, Agrawal, Kayal and Saxena published an

algorithm

they claim performs primality testing in

polynomial time

. Soon after mathematicians such as

Carl Pomerance

looked at the Agrawal, Kayal and Saxena paper and said it appears to be correct. By 2004, their paper was accepted as correct, confirming the long-held belief that primality testing is a

P-problem

.

References

1

Manindra Agrawal, Neeraj Kayal & Nitin Saxena, “PRIMES is in P”,

Annals of Math.

160

(2004): 781 Ã¢â¬â 793

2

Eric Weisstein

, “Primality Testing Is Easy”

MathWorld

News

, August 7, 2002

Title

primality testing

Canonical name

PrimalityTesting

Date of creation

2013-03-22 17:45:37

Last modified on

2013-03-22 17:45:37

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

7

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A41

Generated on Fri Feb 9 15:17:11 2018 by

LaTeXML
prime

prime

An

integer

p

∈

ℤ

is prime if it has exactly two

positive

divisors

. The first few positive

prime numbers

are

2

,

3

,

5

,

7

,

11

,

…

.

A prime number is often (but not always) required to be positive.

Prime numbers are very important objects in many fields of mathematics. The notion of prime number has been generalized in a number of ways.

In

class field theory

, one defines a prime to be a family of

equivalent valuations

; using this

definition

, the primes of the

rational numbers

are given by the positive prime numbers (for a prime

p

, the corresponding

valuation

is the

p

-adic

absolute value

) and one extra prime usually denoted

∞

(corresponding to the usual absolute value on

ℚ

).

In ring theory, one defines the notion of a

prime ideal

, and also a notion of

prime element

(

http://planetmath.org/PrimeElement

). However, the notion of prime ideal is more natural in this

context

than the notion of prime element. For

number fields

, for example, one has

unique factorization

of ideals into prime ideals but one does not always have unique factorization of

elements

into prime elements. The prime ideals of

ℤ

are the

ideals generated by

the prime numbers, as well as the

zero ideal

. Note that the ideal generated by

p

is the same as the ideal generated by

-

p

, so we can consider negative primes

equivalent

to positive primes from this viewpoint as well.

Title

prime

Canonical

name

Prime

Date of creation

2013-03-22 11:51:52

Last modified on

2013-03-22 11:51:52

Owner

djao (24)

Last modified by

djao (24)

Numerical id

11

Author

djao (24)

Entry type

Definition

Classification

msc 11A41

Classification

msc 82-00

Classification

msc 83-00

Classification

msc 81-00

Classification

msc 46L05

Synonym

prime integer

Synonym

prime number

Synonym

rational prime

Related topic

PrimeNumberTheorem

Generated on Fri Feb 9 15:17:12 2018 by

LaTeXML
prime constant

prime constant

The number

ρ

defined by

ρ

=

∑

p

1

2

p

is known as the

prime constant

. It is simply the number whose binary expansion corresponds to the

characteristic function

of the set of

prime numbers

. That is, its

n

th binary digit is

1

if

n

is prime and

0

if

n

is

composite

.

The beginning of the

decimal expansion

of

ρ

is:

ρ

=

0.414682509851111660248109622

⁢

…

The number

ρ

is easily shown to be

irrational

. To see why, suppose it were

rational

. Denote the

k

th digit of the binary expansion of

ρ

by

r

k

. Then, since

ρ

is assumed rational, there must exist

N

,

k

positive integers

such that

r

n

=

r

n

+

i

⁢

k

for all

n

>

N

and all

i

∈

ℕ

.

Since there are an

infinite

number of primes, we may choose a prime

p

>

N

. By definition we see that

r

p

=

1

. As noted, we have

r

p

=

r

p

+

i

⁢

k

for all

i

∈

ℕ

. Now consider the case

i

=

p

. We have

r

p

+

i

⋅

k

=

r

p

+

p

⋅

k

=

r

p

⁢

(

k

+

1

)

=

0

, since

p

⁢

(

k

+

1

)

is composite because

k

+

1

≥

2

. Since

r

p

≠

r

p

⁢

(

k

+

1

)

we see that

ρ

is irrational.

The partial

continued fractions

of the prime constant can be found

http://www.research.att.com/cgi-bin/access.cgi/as/njas/

sequences

/eisA.cgi?Anum=A051007

here.

Title

prime constant

Canonical name

PrimeConstant

Date of creation

2013-03-22 15:02:17

Last modified on

2013-03-22 15:02:17

Owner

mathcam (2727)

Last modified by

mathcam (2727)

Numerical id

12

Author

mathcam (2727)

Entry type

Definition

Classification

msc 11A41

Generated on Fri Feb 9 15:17:14 2018 by

LaTeXML
prime gap

prime gap

The range of consecutive

integers

between

prime number

p

n

and the next prime

p

n

+

1

is called a

prime gap

, though sometimes this term is applied to the number of members of that range. For example, from 89 to 97 the numbers 90 to 96 form a gap of seven non-primes.

Obviously in between each

twin prime

there is a gap of 1. Since there are infinitely many primes, so there are infinitely many prime gaps. If the

twin prime conjecture

is ever proven, it would also prove that there are infinitely many prime gaps of length 1.

A little reflection will show that the easiest way to find a prime gap of a desired length

n

is to look at the range

n

!

+

2

,

…

,

n

!

+

n

, though this gap might actually go all the way from

n

!

-

p

π

⁢

(

n

)

+

1

to

n

!

+

p

π

⁢

(

n

)

-

1

(with

p

x

being the

x

th prime and

π

⁢

(

x

)

being the

prime counting function

). Another way is to look at the range

n

⁢

#

+

2

,

…

,

n

⁢

#

+

n

, where

n

⁢

#

is the

n

th

primorial

(though it might be slightly longer).

In general it is often possible to find prime gaps of greater lengths with much smaller numbers. A000230 in Sloane’s OEIS lists integers that begin prime gaps of greater lengths than previous integers. Harald CramÃÂ©r conjectured that for large

n

a gap of greater lengths than all previous ones can be found at approximately

(

ln

⁡

n

)

2

.

Title

prime gap

Canonical name

PrimeGap

Date of creation

2013-03-22 16:26:07

Last modified on

2013-03-22 16:26:07

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

7

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A41

Generated on Fri Feb 9 15:17:16 2018 by

LaTeXML
prime harmonic series diverges - Chebyshev’s proof

prime harmonic series diverges - Chebyshev’s proof

Theorem

.

∑

p

⁢

prime

1

p

diverges

.

Proof.

(Chebyshev, 1880)

Consider the product

∏

p

≤

n

(

1

-

1

p

)

-

1

Since

(

1

-

1

p

)

-

1

=

1

+

1

p

+

1

p

2

+

⋯

, we have

∏

p

≤

n

(

1

-

1

p

)

-

1

=

(

1

+

1

2

+

1

2

2

+

⋯

)

⁢

(

1

+

1

3

+

1

3

2

+

⋯

)

⁢

(

1

+

1

5

+

1

5

2

+

⋯

)

⁢

⋯

So for each

m

≤

n

, if we expand the above product,

1

m

will be a term. Thus

∏

p

≤

n

(

1

-

1

p

)

-

1

≥

∑

x

=

1

n

1

x

Taking logarithms, we have

∑

p

≤

n

-

ln

⁡

(

1

-

1

p

)

≥

ln

⁢

∑

x

=

1

n

1

x

But

ln

⁡

(

1

-

u

)

=

-

u

-

u

2

2

-

u

3

3

-

⋯

, so

-

ln

⁡

(

1

-

1

p

)

=

1

p

+

1

2

⁢

p

2

+

1

3

⁢

p

3

+

⋯

≤

1

p

+

1

p

2

+

1

p

3

+

⋯

≤

2

p

Hence

∑

p

≤

n

2

p

≥

∑

p

≤

n

(

-

ln

⁡

(

1

-

1

p

)

)

≥

ln

⁢

∑

x

=

1

n

1

x

and thus

∑

p

≤

n

1

p

≥

1

2

⁢

ln

⁢

∑

x

=

1

n

1

x

But the latter series diverges, and the result follows.

Title

prime harmonic series

diverges - Chebyshev’s proof

Canonical name

PrimeHarmonicSeriesDivergesChebyshevsProof

Date of creation

2013-03-22 16:23:48

Last modified on

2013-03-22 16:23:48

Owner

rm50 (10146)

Last modified by

rm50 (10146)

Numerical id

9

Author

rm50 (10146)

Entry type

Theorem

Classification

msc 11A41

Generated on Fri Feb 9 15:17:18 2018 by

LaTeXML
prime magic square

prime magic square

A

prime magic square

is a

magic square

consisting only of

prime numbers

(the

magic constant

may be a

composite number

, especially if the sides are of even length). The primes don’t have to be consecutive, though it is sometimes convenient to consider 1 a prime number for the purpose of constructing these squares.

The smallest prime magic square with the smallest possible magic constant (111) is

[

67

1

43

13

37

61

31

73

7

]

first published by Henry Ernest Dudeney in 1917.

Rudolf Ondrejka constructed this magic square using only

Chen primes

:

[

17

89

71

113

59

5

47

29

101

]

The magic constant is 177.

References

1

Dudeney, E.

Amusements in Mathematics

New York: Dover (1970): Problem 408

Title

prime magic square

Canonical

name

PrimeMagicSquare

Date of creation

2013-03-22 16:43:28

Last modified on

2013-03-22 16:43:28

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

5

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A41

Generated on Fri Feb 9 15:17:19 2018 by

LaTeXML
prime pyramid

prime pyramid

A

prime pyramid

is a triangular

arrangement

of numbers in which each row

n

has the

integers

from 1 to

n

but in an order such that the sum of any two consecutive terms in a row is a

prime number

. The first number must be 1, and the last number is usually required to be

n

, all the numbers in between are in whatever order fulfills the requirement for

prime sums

. Unlike other triangular arrangements of numbers like Pascal’s

triangle

or Losanitsch’s triangle, the contents of a given row are not determined by those of the previous row. However, if it happens that one has calculated row

n

-

1

and that

2

⁢

n

-

1

is a prime number, one could just copy the previous row and add

n

at the end. Here is a prime pyramid reckoned that way:

1

1

2

1

2

3

1

2

3

4

1

4

3

2

5

1

4

3

2

5

6

1

4

3

2

5

6

7

1

4

7

6

5

2

3

8

⋮

⋮

⋮

Often row 1 just contains an asterisk or some other non-numerical symbol, but since the idea of adding two numbers in row 1 is moot, here row 1 just contains a 1 per analogy to the following rows and to other triangular arrangements of numbers.

References

1

R. K. Guy,

Unsolved Problems in

Number Theory

New York: Springer-Verlag 2004: C1

Title

prime pyramid

Canonical

name

PrimePyramid

Date of creation

2013-03-22 17:00:03

Last modified on

2013-03-22 17:00:03

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

4

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A41

Generated on Fri Feb 9 15:17:26 2018 by

LaTeXML