Divisible by three

Loop invariants.

Groovy

Some delightful number theory.