```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.
    """
    # Formula for the sum of the first n natural numbers: n * (n + 1) / 2
    sum_of_numbers = n * (n + 1) // 2
    
    # The square of the sum
    squared_sum = sum_of_numbers ** 2
    
    # Formula for the sum of the squares of the first n natural numbers:
    # n * (n + 1) * (2 * n + 1) / 6
    sum_of_squares = n * (n + 1) * (2 * n + 1) // 6
    
    # The difference between the two values
    difference = squared_sum - sum_of_squares
    
    return difference

```