1

I found an unintuitive result, and I'd like help understanding why this is the case. I was experimenting with the sequence given by $a_n = 1 + \frac{1}{a_{n-1}}, a_1 = 1$. This sequence goes like $1, 2, \frac{3}{2}, \frac{5}{3}, \frac{8}{5}, \frac{13}{8}...$ and produces a Fibonacci-esque relation between the numerators and denominators.

Now, I tried writing the similar sequence $b_n = 1 + (b_{n-1})^{-1} mod 13$, where the $^{-1}$ denotes the modular inverse. $b_1 = 1$ as well, so the sequence goes $1, 1 + 1 = 2, 1 + 7 = 8, 1 + 5 = 6, 1 + 11 = 12, 1 + 12 = 0$.

If you compare the two sequences, $b_n$ hits 0 at the same time the numerator of $a_n$ hits 13, which is 0 mod 13. My question is, why does this happen? The intuitive result in my mind is that if $b_n = 0$ and $a_n = \frac{p}{q}$, then the conclusion wouldn't be that the numerator of $p$ is divisible by 13, but rather that $p * (q)^{-1}$ would be divisible by 13, where $q^{-1}$ is the modular inverse of $q$ mod 13, as you would convert the whole fraction to mod 13.

So anyway, my question is, is there an intuitive way of understanding why just the numerator is the one that will be divisible mod 13, rather than the entire fraction $a_n$?

johnrolfe
  • 21
  • 2
  • 2
    Not sure why you are stressing $13$. Pretty easy to see that $a_n=\frac {F_n}{F_{n-1}}$ since $F_n=F_{n-1}+F_{n-2}\implies \frac {F_n}{F_{n-1}}=1+\frac {F_{n-2}}{F_{n-1}}$ and we can then check initial conditions. Is that what you are after? – lulu Dec 24 '18 at 21:37
  • Well, 13 was just an example. Similarly, if we use the sequence $b_n=1+(b_{n−1})^{−1}mod5$, then since $a_4 = \frac{5}{2}$, it ends up being that $b_4 = 0 $. Essentially, what I'm doing when creating $b_n$ is just taking the $a_n$ sequence and converting the $\frac{1}{a_{n-1}}$ to a modular inverse. The effect of this is that whenever the numerator of $a_k$ is divisible by a prime p, then the sequence $b_n = 1+(b_{n−1})^{−1}$ mod p will have $b_k$ equal to 0. Why is this so? Or at least, why is it the numerator of $a_k$ that is so important? – johnrolfe Dec 24 '18 at 21:43
  • Well, until you hit $0's$ in the denominator you can just reduce the rational form modulo the given prime, To stick with your $13$, the multiplicative inverse of $8\pmod {13}$ is $5\pmod {13}$. Thus where you have $\frac n8$ rationally, you'd get $5n\pmod {13}$. This reasoning works modulo each prime. – lulu Dec 24 '18 at 21:47
  • Oh, that makes sense. Thank you for clarifying! – johnrolfe Dec 24 '18 at 21:53
  • See here for modular fractions. You are simply reducing the sequence $!\bmod n,,$ which is well-defined for all fractions with denominator coprime $,n.\ $ You'll get the same result whatever order you do the mod reductions, e.g. doing it all rationally then doing one final mod reduction , vs. reducing everything right away (or mix and match) because modular reduction commutes with ring operations plus, times (and said inverses), i.e. it is a ring homomorphism. – Bill Dubuque Dec 24 '18 at 22:48

0 Answers0