- #1
Atran
- 93
- 1
Hi, I've recently found the following algorithm and I'm willing to share it:
For example, given an integer n=46, an exponent x=5, and d=13, we have 465/13.
First, we set the equation, n = q*d + r = q*13 + r
We have, 46 = 3*13 + 7
Thus, [q=3, r=7, d=13]
And: 465/13 = 3*464 + 7*(3*463 + 7*(3*462 + 7*(3*461 + 7*(46/13))))
Let [q, r, d] and we have (n^4)/d, then:
(n^4)/d = q*n^(4-1) + r*(q*n^(4-2) + r*(q*n^(4-3) + r*(n/d)))
I don't know if it's interesting to you or not, but what are your thoughts about it?
For example, given an integer n=46, an exponent x=5, and d=13, we have 465/13.
First, we set the equation, n = q*d + r = q*13 + r
We have, 46 = 3*13 + 7
Thus, [q=3, r=7, d=13]
And: 465/13 = 3*464 + 7*(3*463 + 7*(3*462 + 7*(3*461 + 7*(46/13))))
Let [q, r, d] and we have (n^4)/d, then:
(n^4)/d = q*n^(4-1) + r*(q*n^(4-2) + r*(q*n^(4-3) + r*(n/d)))
I don't know if it's interesting to you or not, but what are your thoughts about it?