This post comes from the suggestion of [Joel Moreira][1] in a [comment](https://mathoverflow.net/questions/377706/an-alternative-to-continued-fraction-and-applications#comment958452_377706) on https://mathoverflow.net/q/377706/34538 (itself inspired by the Numberphile video [2.920050977316][2] and [Fridman, Garbulsky, Glecer, Grime, and Tron Florentin - A prime-representing constant][3]).  

Let  $u_0 \ge 2$. Consider the recurrence relation $$u_{n+1} = \lfloor u_n \rfloor (u_n - \lfloor u_n \rfloor + 1).$$ If $u_n$ is integral then $u_{n+1}=u_n$. The sequence $(u_n)$ is called *eventually integral* if there is $n$ such that $u_n$ is integral.

**Question**: Is the sequence $(u_n)$ eventually integral when $u_0 \ (\ge 2)$ is a rational number? 

*Remark*: It is true for $u_0=\frac{p}{q}$ with $p < 10000$ (see Appendix).  

For $u_0=\frac{11}{5}$, then $$(5u_n)=(11, 12, 14, 18, 24, 36, 42, 56, 66, 78, 5 \cdot 24, \dots).$$ Here is a picture of the dynamic:  
[![enter image description here][4]][4] 

The general proof could be non-easy, by regarding the example $u_0=\frac{15}{7}$: $$(7u_n) = (15, 16, 18, 22, 24, 30, 36, 40, 60, 88, 132, 234, 330, 376, 636, 1170, 1336, 2470, 4576, 7836, 11190, 17578, 20088, 34428, 44262, 50584, 65034, 102190, 160578, 7 \cdot 39324,  \dots)$$  

For $u_0=\frac{5789}{2837}$, the sequence $(u_n)$ reaches an integer at $n=27786$. Below is the picture of $\frac{u_{n+1}}{u_n}$ from $n=0$ to $27786$, which looks completely random.

[![enter image description here][5]][5]

___
**Appendix**  

In the following list the datum $[r,(p,q)]$ means that the sequence $(u_n)$, with $u_0=\frac{p}{q}$, reaches an integer at $n=r$. The list provides the ones with the longest $r$ according the lexicographic order of $(p,q)$.

*Computation*

    sage: search(10000)
    [1, (2, 1)]
    [2, (5, 2)]
    [3, (7, 2)]
    [4, (7, 3)]
    [11, (11, 5)]
    [30, (15, 7)]
    [31, (29, 14)]
    [45, (37, 17)]
    [53, (39, 17)]
    [124, (41, 19)]
    [167, (59, 29)]
    [168, (117, 58)]
    [358, (123, 53)]
    [380, (183, 89)]
    [381, (201, 89)]
    [530, (209, 97)]
    [532, (221, 97)]
    [622, (285, 131)]
    [624, (295, 131)]
    [921, (359, 167)]
    [1233, (383, 181)]
    [1365, (517, 251)]
    [1482, (541, 269)]
    [2532, (583, 263)]
    [3121, (805, 389)]
    [3586, (1197, 587)]
    [3608, (1237, 607)]
    [3860, (1263, 617)]
    [4160, (1425, 643)]
    [6056, (1487, 743)]
    [9658, (1875, 859)]
    [9662, (1933, 859)]
    [10467, (2519, 1213)]
    [10534, (2805, 1289)]
    [11843, (2927, 1423)]
    [12563, (3169, 1583)]
    [13523, (3535, 1637)]
    [14004, (3771, 1871)]
    [14461, (4147, 2011)]
    [17485, (4227, 1709)]
    [18193, (4641, 1987)]
    [18978, (4711, 2347)]
    [22680, (5193, 2377)]
    [23742, (5415, 2707)]
    [24582, (5711, 2663)]
    [27786, (5789, 2837)]
    [27869, (6275, 2969)]
    [29168, (6523, 3229)]
    [32485, (6753, 2917)]
    [33819, (7203, 3361)]
    [41710, (7801, 3719)]
    [49402, (8357, 3863)]



*Code*

    def Seq(p,q):
    	x=Rational(p/q)
    	A=[floor(x)]
    	while not floor(x)==x:
    		n=floor(x)
    		x=Rational(n*(x-n+1))
    		m=floor(x)
    		A.append(m)
    	return A
    
    def search(r):
    	m=0
    	for p in range(2,r):
    		for q in range(1,floor(p/2)+1):
    			A=Seq(p,q)
    			l=len(A)
    			if l>m:
    				m=l
    				print([m,(p,q)])


  [1]: https://mathoverflow.net/users/18698/joel-moreira
  [2]: https://youtu.be/_gCKX6VMvmU
  [3]: https://doi.org/10.1080/00029890.2019.1530554
  [4]: https://i.sstatic.net/viHif.png
  [5]: https://i.sstatic.net/lM3IE.png