5. In how many ways can we select two different numbers from the first 2023 natural numbers so that their sum is even? Write the solution in the form of a square of a natural number.

## Tasks worth 10 points:
5. In how many ways can we select two different numbers from the first 2023 natural numbers so that their sum is even? Write the solution in the form of a square of a natural number.

## Solution.

The sum of two natural numbers is even if both are even or both are odd. 1 POINT

Among the first 2023 natural numbers, there are 1011 even and 1012 odd numbers.

Pairs of even numbers can be chosen in $\frac{1011 \cdot 1010}{2}=1011 \cdot 505$ ways.

Pairs of odd numbers can be chosen in $\frac{1012 \cdot 1011}{2}=506 \cdot 1011$ ways.

The total number of ways is $1011 \cdot 505 + 506 \cdot 1011$

$=1011 \cdot (505 + 506) = 1011^2$ ways.