This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Integers

Integers
represents the domain of integers, as in xIntegers.
  • xIntegers evaluates immediately only if x is a numeric quantity.
  • Simplify can be used to try to determine whether an expression is an integer.
  • IntegerQ[expr] tests only whether expr is manifestly an integer (i.e., has head Integer).
7 is an integer:
If is an integer, so is :
Find positive integer solutions of a Pell equation:
7 is an integer:
In[1]:=
Click for copyable input
Out[1]=
 
If is an integer, so is :
In[1]:=
Click for copyable input
Out[1]=
 
Find positive integer solutions of a Pell equation:
In[1]:=
Click for copyable input
Out[1]=
Test domain membership of a numeric expression:
Make domain membership assumptions:
Specify the default domain over which a function should work:
Find integer roots of a high-degree polynomial:
Find a representation of an integer as a sum of seven squares:
Solve an optimization problem over the integers:
Integers contains Primes:
Integers is contained in Complexes, Reals, Algebraics, and Rationals:
IntegerQ returns True for explicit integers and False otherwise:
Element remains unevaluated when it cannot decide whether an expression is an integer:
New in 4