Problem

Source: Israeli Olympic Revenge 2021, Problem 1

Tags: number theory, functional equation, algebra, function



Let $\mathbb N$ be the set of positive integers. Find all functions $f\colon\mathbb N\to\mathbb N$ such that $$\frac{f(x)-f(y)+x+y}{x-y+1}$$is an integer, for all positive integers $x,y$ with $x>y$.