Numloop by

#!/usr/bin/python3\x0d
def numLoop(n):\x0d
   ret = 0\x0d
   already = []\x0d
   while n != 1:\x0d
      already.append(n)\x0d
      if n % 2 == 1:\x0d
         n = 6 * n + 2\x0d
      else:\x0d
         n = int((n + 3) / 4)\x0d
      if n in already:\x0d
         return "Infinity"\x0d
      ret += 1\x0d
   return str(ret)\x0d
\x0d
for i in range(1, 1000):\x0d
   print(numLoop(i) + ", " + str(i))\x0d
      

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page