OddQ

OddQ[expr]

gives True if expr is an odd integer, and False otherwise.

Details

  • OddQ[expr] returns False unless expr is manifestly an odd integer (i.e. has head Integer, and is odd).

Examples

open allclose all

Basic Examples  (2)

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]=

Applications  (1)

Properties & Relations  (2)

Possible Issues  (1)

See Also

IntegerQ  EvenQ  TrueQ  Divisible

Tutorials

Introduced in 1988
(1.0)