title: for loop in thymeleaf
body: <p>How can I do the following (java):</p>
  
  <pre><code>for(int i = 0; i &lt; 81 ; i+=20){
     //Should loop through 5 times!
  }
  </code></pre>
  
  <p>in Thymeleaf?</p>
  
  <p>I've tried this:</p>
  
  <pre><code>&lt;option th:each="i : ${#numbers.sequence( 1, 81/20)}"&gt;
     &lt;p th:text="${ i }"&gt;&lt;/p&gt; &lt;!-- THIS loops 4 times, instead of 5 --&gt;
  &lt;/option&gt;
  </code></pre>
  
  <p>The problem is that it is not as accurate as the java piece of code. How to do this?</p>