Generalizing the "remainder" for integer log and sqrt

Euclid algorithm recurses over the integer division to get the gcd of two integers.

Similarly, recursing other one of those operations might get interesting results.

E.g., applying the binary log to a number, then to the residue, etc., gives the binary representation of the number (it outputs the 1s).

Finding the continued fraction for a given real number may also fit into your idea - I have not checked.
Really what you are computing is:

r = b^(log(b,n)^(+1)) mod n

Discrete logarithm is maybe what you are looking for.
by
If you modify your definition of ilog to be ilog_b (n) = {k, r} → n = r•b^k where b ∤ r, then k is the b-adic order of n.

0 like 0 dislike