Upgrading from:

# NumberTheory`NumberTheoryFunctions`

SquareFreeQ, PrimePowerQ, KroneckerSymbol, ChineseRemainder, and PrimitiveRoot have been added to the built-in Mathematica kernel functions.
NextPrime and PreviousPrime are now available as the newly added built-in Mathematica kernel function NextPrime.
Random[Prime,] is now available as the newly added built-in Mathematica kernel function RandomPrime.
The functionality of PrimeFactorList is available in the enhanced built-in Mathematica kernel function FactorInteger.
SqrtMod is now available as the built-in Mathematica kernel function PowerMod.
SqrtModList is now available as the newly added built-in Mathematica kernel function PowerModList.
ClassNumber is now available as the newly added built-in Mathematica kernel function NumberFieldClassNumber.
SumOfSquaresR is now available as the built-in Mathematica kernel function SquaresR.
OrderedSumOfSquaresRepresentations is now available as the built-in Mathematica kernel function PowersRepresentations.

### SquareFreeQ

A product of distinct primes contains no squared factors:

Version 5.2

### NextPrime and PreviousPrime

The next prime after one million:

Version 5.2

The last prime before one million:

Version 5.2

### Random[Prime, ...]

A random prime number between 10 and 100:

Version 5.2

### PrimeFactorList

Find the list of prime factors of a rational number:

Version 5.2

### PrimePowerQ

Here is a number that is a power of a single prime:

Version 5.2

### ChineseRemainder

The smallest positive integer x so that x is equal to 3 modulo 4 and x is equal to 4 modulo 5:

Version 5.2

### SqrtMod and SqrtModList

This finds the smallest non-negative integer so that is equal to 3 modulo 11:

Version 5.2

This returns all integers less than 11 that satisfy the relation:

Version 5.2

### ClassNumber

Find the class number for the algebraic number field generated by :

Version 5.2

### FundamentalDiscriminantQ

FundamentalDiscriminantQ can be replaced by the following definition:

Version 5.2

### ClassList

ClassList can be replaced by the following definition:

Version 5.2

### KroneckerSymbol

Find the Kronecker symbol :

Version 5.2

### SumOfSquares

Number of ways to represent 100 as a sum of 3 squares:

Version 5.2

### SumOfSquaresRepresentations

SumOfSquaresRepresentations can be replaced by the following definition:

Version 5.2

### OrderedSumOfSquaresRepresentations

Here is an ordered list of the representations of 100 as a sum of 3 squares:

Version 5.2

### LeastPrimeFactor

LeastPrimeFactor can be replaced by the following definition:

Version 5.2

### QuadraticRepresentation

QuadraticRepresentation can be replaced by the following definition:

Version 5.2

Verify that this is indeed one of the possible representations:

### SumOfFactors

Compute the sum of factors of that are less than :

Version 5.2

### WhichRootOfUnity

WhichRootOfUnity can be replaced by the following definition:

Version 5.2

### AliquotSequence

AliquotSequence can be replaced by the following definition:

Version 5.2

### AliquotCycle

AliquotCycle can be replaced by the following definition:

Version 5.2

The original package is now available on the web at library.wolfram.com/infocenter/MathSource/6774.