Yes, it's math, but it's simple math. You have to choose what you want to do math on, height, level, etc..., then by what amount, 3, 4, etc...

So let's say that you choose "Level" and "4". This means that anybody who is at a level divisible by 4 will be effected by the spell you choose.

It does take a bit of work to do the math but it can be very powerful as there is no range to a math "spell" so you can hit nearly every enemy with a Holy or Flare or your entire party with a Cure 4 or Haste. But be careful because Math doesn't differentiate between friend and foe, so if you pick a Level 4 Flare and any of your characters' level is divisible by 4 (like 60), they'll get hit too.