% I'm using percent signs for comments, as in LaTeX. All other lines are copied into Desmos verbatim.
% These functions are considered inputs to the program, so I haven't golfed them.
d\left(x,y\right)=\frac{x-y}{x-2y}
p=10
% This is the program itself. Only the last two lines (y and x) are rendered; f(x) is hidden.
h=\sum_{i=[1...(2p+1)^2]}^{[1...(2p+1)^2]}[-p...p][\mod(i-1,2p+1)+1]
% Without the backslash before "mod", Desmos reads it as m*o*d(...) rather than \operatorname{mod}(...).
k=\sort(h)