WolframAlpha computational knowledge AI
n=10, d=7, table[((1-(floor(((x+d)-1)/n)))*(x+d))+((floor(((x+d)-1)/n))*((n+1)-x)), {x, 1, n}]