Problem

Source: RMO maharashtra and goa 2019 P1

Tags: number theory, greatest common divisor



For each $n\in\mathbb{N}$ let $d_n$ denote the gcd of $n$ and $(2019-n)$. Find value of $d_1+d_2+\cdots d_{2018}+d_{2019}$