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

OddQ

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