def sum_square_difference(n):
    """Calculates difference between sum of squares and square of sum of first
    n natural numbers."""
    sum_squares = sum([x*x for x in range(1, n+1)])
    square_sum = sum([x for x in range(1, n+1)])**2
    return square_sum - sum_squares