0
$\begingroup$

What is the remainder of the following division:

$\frac{(x-1)^y + (x+1)^y}{x^2}$

For what values of $y$ will the remainder be maximized?

(Before anyone asks, NO this is not project euler)

  • 0
    @HassanMuhammad Both $x$ and $y$ are positive integers.2012-08-29

1 Answers 1

2

Assuming $y,x$ a natural number and $x ≠ 0$.

If $y$ is odd, $(x-1)^y+(x+1)^y=2(x^y+^yC_2x^{y-2}+...+^yC_{y-1}x)≡2xy\pmod{x^2}$

Now, $0≤2xy\pmod{x^2}

If $x$ is odd, the maximum remainder of $2y\pmod{x}$ is $(x-1)$, which will make the remainder maximum $= (x-1)x$.

So, $2y=kx+(x-1)$ will lead to the same maximum remainder, where $k$ any non-negative integer.

If $x$ is even, the maximum remainder of $2y\pmod{x}$ is $(x-2)$ which will make the remainder maximum $=(x-2)x$.

So, $2y=kx+(x-2)$ will lead to the same maximum remainder, where $k$ any non-negative integer .

If $y$ is even, $(x-1)^y+(x+1)^y=2(x^y+^yC_2x^{y-2}+...+^yC_{y-2}x^2+1)≡2\pmod{x^2}$, so the remainder is constant for all even $y$ .

  • 0
    @JenniferDylan, thanks I've utilized it & will do in the future.2012-08-29