A377945 Numbers k such that the trajectory of k under the `3x-1' map reaches k+1.
1, 3, 9, 13, 15, 18, 19, 33, 49, 67, 73, 90, 109, 163, 391, 522, 607, 729, 810, 1093, 1639
Offset: 1
Examples
13 is a term because its trajectory 13 -> 38 -> 19 -> 56 -> 28 -> 14 -> ... reaches 13 + 1 = 14.
Crossrefs
Cf. A001281.
Programs
-
Python
def isok(n): temp, loops = n, 0 while(temp != n + 1 and loops<2): temp = temp // 2 if temp % 2 == 0 else 3 * temp - 1 if(temp == 1 or temp == 5 or temp == 17): loops += 1 return temp == n + 1 print([n for n in range(1, 2000) if isok(n)])
Comments