uv123's blog

By uv123, history, 4 weeks ago, In English

I have been scouring for resources that i can understand, which prove that the first fibonacci number divisible by K can be found in O(K) time, but I couldnt. Can someone provide a satisfactory proof for that?

FOUND IN EDITORIAL

  • Vote: I like it
  • +9
  • Vote: I do not like it

»
4 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Pisano periods might help

  • »
    »
    4 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    For Pisano periods, the upper bound is given by P(k) ≤ k*k−1. However, we are primarily concerned with the first occurrence of 0 in F(n)modk and the repetition of the entire sequence (where F(n) is the n-th Fibonacci number). Therefore, I couldn't infer much from it.

    • »
      »
      »
      4 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      There are at most 4 zeros in the Pisano period, so it only changes by a constant factor, and since the 0s repeat they can't be dense in the first quarter of the period or something like that, so they are equivalent (not sure though, might be wrong)

    • »
      »
      »
      4 weeks ago, # ^ |
        Vote: I like it +6 Vote: I do not like it

      P(k) <= 6k, maybe you should read those sources you scoured for more carefully