Try
<dtml-if "_.math.divmod(33,2) == 1"> a </dtml-if>
Thanks, everyone. For some reason, in the line in the documentation
"The following attributes are available through the variable _"
the word 'attributes' didn't click with me as Python attributes.