Skip to main content
2 of 2
deleted 44 characters in body
Chris Wuthrich
  • 8.9k
  • 1
  • 36
  • 47

Consider a sequence $a_i=p \mod a_{i-1}$, where $p$ is a prime number, how to estimate the smallest $i$ where $a_i=1$?

Given a prime number $p$ and an integer $0<a_0<p$. Consider a sequence $a_i=p \mod a_{i-1}$. How to estimate the smallest $i$ where $a_i=1$?

I tried some prime numbers, and found that such $i$ is always small. I have never found an $i$ larger than 50 when $p$ is smaller than $10^7$. How to estimate the upper bound of $i$?

zbh2047
  • 611
  • 1
  • 5
  • 13