```python
def sum_difference(n):
    """
    Calculates the difference between the squared sum of the first n natural
    numbers and the sum of the squared first n natural numbers.
    """
    # The sum of the first n natural numbers is n * (n + 1) / 2
    sum_of_n = n * (n + 1) // 2
    
    # The square of the sum of the first n natural numbers
    squared_sum = sum_of_n ** 2
    
    # The sum of the squares of the first n natural numbers is n * (n + 1) * (2n + 1) / 6
    sum_of_squares = n * (n + 1) * (2 * n + 1) // 6
    
    return squared_sum - sum_of_squares

```