WolframAlpha computational knowledge AI
f = m * (m - 1) + 1 + (-1)^m * (x - y) where m = (x + y + abs(x-y))/2