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

EvenQ

EvenQ[expr]
gives True if expr is an even integer, and False otherwise.
  • EvenQ[expr] returns False unless expr is manifestly an even integer (i.e., has head Integer, and is even).
Test whether 8 is even:
EvenQ gives False for non-numeric expressions:
Test whether 8 is even:
In[1]:=
Click for copyable input
Out[1]=
 
EvenQ gives False for non-numeric expressions:
In[1]:=
Click for copyable input
Out[1]=
Test whether an array consists of even integers:
An integer is either odd or even. Use OddQ to check that an integer is odd:
Even integers are divisible by :
The generating function of the even integers is :
Expressions that represent even integers but do not evaluate explicitly will still give False:
It is necessary to use symbolic simplification first:
New in 1