> For the complete documentation index, see [llms.txt](https://docs-57.gitbook.io/data-structure-and-algorithms/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-57.gitbook.io/data-structure-and-algorithms/problems/array/unique-integers-that-sum-up-to-0.md).

# Unique Integers That Sum Up To 0

Given an integer `n`, return any array containing `n` unique integers such that they add up to `0`.

#### Example 1:

**Input: `5`**

**Output: `[-4,-2,0,2,4]`**

#### Example 2:

**Input: `3`**

**Output: `[-2, 0, 2]`**

#### Example 3:

**Input: `1`**

**Output: `[0]`**

```csharp
public class Solution
{

    public int[] SumZero(int n)
    {
        var result = new int[n];
        for (int i = 0; i < n; i++)
        {
            result[i] = i * 2 - n + 1;
        }
        return result;
    }

}
```
