Magic Squares

A magic square is a square grid of numbers containing all the numbers 1, 2, 3 and so on, each number only once. Each row, column and diagonal of a magic square sums up to the same magic number. Generate a magic square by choosing its dimensions.