I don't know how helpful this will be but here are a few observation that I made on this problem.

There are two cases.

Cases I: If N is prime (this is the easy one)

In this case for any so the least common multiple will be

This gives

Collecting the first and last term and using the above observation we get

Case II: If N is composite.

Now this can be broken down as follows

If then the

If then the

So this gives