title: Generate random numbers increasing by multiples of N in Java
body: <p>I need to write a short randomizer which generates a random number between 1 to N where the random number is increasing by multiples of M. </p>
  
  <p>For example: generate numbers between 1 and (N=30) increasing by multiples of (M=5). The only possible generated numbers can be then: 1,5,10,15,20,25 and 30. Hope you get what I mean :) </p>
  
  <p>Normally if you use <code>new Random().nextInt(30)+1</code>, you get numbers increasing by multiples of 1 (1,2,3,4,5,6,7,etc.). That is not what I want.</p>
  
  <p>Any help, links, or directions are very appreciated?</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>That the sequence of generated random numbers could include 1 not zero is one of the requirements of the method. Precisely, the sequence always starts with the lower bound (min). In the example the lower bound is 1 and therefore there can't be zero in the sequence. It's odd I know, but those are the requirements I have to follow ;) </p>