I tinkered with this method to calculate the remainder of a division you can see the examples, and the questions I ask myself are:
Question 1:
In what case is this method better than other methods for finding the remainder of the division.
Question 2:
Could we find a way to use it for all the examples(the best polynomials to choose to make calculating the remainder easier)?
Example 1: What is the remainder when $10^{124}-5$ is divided by $33$?
We have $(10^{124}–5)/33=(10^{124}–5)/(3*10+3)$
I set $x=10$ so I have $P1/P2=(x^{124}–5)/(3x+3)$ with $P1=(x^{124}–5)$ and $P2=(3x+3)$
Using the Euclidean division of polynomials, to divide by a polynomial of degree $1$ $P2$, simply interpolate at the root of the divisor, here $x = -1$ because $P2(-1)=0$.
We know that $P1=qP2+r$ with $r$ of degree zero.
And that $r=P1(-1)=(-1^{124}–5)=-4$ which equals $29$ mod $33$.
Example 2: What is the remainder when $1009^{12}+1$ is divided by $2017$?
I set $x=1009$ so I have $P1/P2=(x^{12}+1)/2017=(x^{12}+1)/(2x - 1)$ with $P1=(x^{12}+1)$ and $P2=(2x - 1)$
Using the Euclidean division of polynomials, to divide by a polynomial of degree $1$ $P2$, simply interpolate at the root of the divisor, here $x = 1/2$ because $P2(1/2)=0$.
We know that $P1=qP2+r$ with r of degree zero.
And that $r=P1(1/2)=(2^{12}+1)/2^{12}=4097/4096$
So $4096=4097r$ mod $2017$ with $r < 2017$ With an excel spreadsheet we find $r=489$.
Example 3: What is the remainder when $4^{29}$ is divided by $63$?
We have $(4^{29})/63 = (4^{29})/(4^3–1)$.
I set $x = 4$, so I have $P1/P2 = (x^{29})/(x^3–1)$with $P1 = x^{29}$ and P2 = $(x^3–1)$.
By using Euclidean division of polynomials:
$r=x^2=4^2=16$ , the remainder is $16$ mod $63$.
Or I can of course reduce large numbers in the form $P1=x^{29}=x^2*X^{27}=16X^{27}$ and in the divisor I replace $x^3=X$ so I directly have $r=P1(1 )=16$ with $P2=X-1$ and $P2(1)=0$.
Simply set ($2^n -1)/(2k-1)$ or ($2^n -1)/(2k+1)$ with $1<k<\sqrt{n}$ $(2^n -1)/(2k-1)=(x^n -1)/(2k-x/2)$ or $(2^n -1)/(2k+1)=(x^n -1)/(2k+x/2)$, so $r=(4k)^n-1$ or $r=(-4k)^n-1$ in any case, I am trying to express the remainder in terms of $k$ and show that for a given $n$, the remainder will never be zero $\mod k$.
– z.10.46 Jan 06 '24 at 18:38