For a positive integer $n$ define $f(n)$ as: \begin{equation} f(n) = \begin{cases} n/2, & \text{if $n$ is even}\\ n + \lfloor n^x \rfloor, & \text{if $n$ is odd.} \end{cases}\end{equation} I want to know for what values of $x$ we can repeat this two operations until this function returns $1$. Also, if it's possible to offer some explanation or proof of why this happens.
For $0<n< 10^5$ I've found the following values of $x$ that return $1$. $$x \in \{ 0.26 , 0.37, 0.39, 0.4 , 0.43, 0.44 , 0.45, 0.5, 0.51, 0.52, 0.53, 0.54\}$$
Code in python:
import math as math
x = 0.5 # choose a x to test
def function(n):
while(n!=1):
if(n%2 == 0): n = n/2
else: n = n + math.floor(math.pow(n, x))
print(n) # print each step to make sure it is correct
number=1
while(number < 100000): # test the first 10^5 positive integers
function(number)
number = number + 1
print("number = ", number)
# if the integer tested is printed, this means it reached 1,
# if not, it entered an infinite loop never reaching 1
# (to be sure you can print 'n' (the steps) inside the first while loop)
You can paste this in https://www.online-python.com, or go directly to https://www.online-python.com/ofrZdkGNCO; or use another online Python compilers.
Example: For $n=50301$ and $x=0.5$ we have the steps:
50525
50749
50974
25487
25646
12823
12936
6468
3234
1617
1657
1697
1738
869
898
449
470
235
250
125
136
68
34
17
21
25
30
15
18
9
12
6
3
4
2
1