How do I solve this equation
$L = D + [D:4]$
- L is a known integer obtained previously.
- D is an integer.
- $[D:4]$ Is the quotient part of (D/4)
At first glance I did not know how to solve this equation as I have never seen this type in my calculus studies. After searching online I found that this is modular arithmetic for two reasons:
- The original relation is a congruence equation (Zeller's Rule) dealing with cyclical calendar numbers and I understand that modular arithmetic deals with cyclical integers.
$D/4=quotient(d/4)+remainder (d/4)$ and since $D (mod 4)=remainder(d/4)$ that also means we are dealing with modular arithmetic.
$∴ [D:4]=D/4-D (mod 4)$
$∴ L=5/4 D-D (mod 4) ……………….. (1)$
how to go further with eq. (1)?
Although I read the modular arithmetic rules and practiced a little but I wasn’t sure if I was going the right path.
I tried to eliminate the
D (mod 4) part by multiplying it with its inverse according to the following rule:
Calculate $A * D (mod 4)$ for $A$ values 0 through (4-1), The modular inverse of $D (mod 4)$ is the “A” value that makes $A * D (mod 4) = 1$ and only the numbers that share no prime factors with 4 have a modular inverse $(mod 4)$*
From this point I can obtain an inverse (I think) but It makes no sense to me.
Can anyone help please.