Project Euler #5 in Java
Mathematically, the least common multiple of a range of numbers can be expressed as 

$$LCM(1..1) = 1$$
$$LCM(1..n+1) = \frac{LCM(1..n) * (n+1)}{GCD(\;LCM(1..n), \;n+1)} $$

So you can start with 1 and work your way up 

static long leastCommonMultiple(long n) {
    long multiple = 1;

    for ( long i = 1; i &lt;= n; i++ ) {
        multiple *= i / gcd(multiple, i);
    }

    return multiple;
}


The optimal Greatest Common Divisor algorithm is 

static long gcd(long a, long b) {
    return ( 0 == b ) ? a : gcd(b, a%b);
}


The iterative version is 

static long gcd(long a, long b) {
    while ( 0 != b ) {
        long temp = a;
        a = b;
        b = temp % b;
    }

    return a;
}


Running with the iterative version takes about a third of the time that your solution does on my machine.  

You can get an additional speedup by using the fact that you already know \$LCM(1..10) = 2520\$.  

static long leastCommonMultiple(long n) {
    long multiple = 2520;

    for ( long i = 11; i &lt;= n; i++ ) {
        multiple *= i / gcd(multiple, i);
    }

    return multiple;
}


That allows you to start at 11 rather than 1.  It's not much of a gain though.  And of course, it's unique to this particular problem.