base_previous by Alkaline Privo

# F(1) = 1
# F(n) = n written in base X, where
# X = F(n-1) interpreted in base 10
# Print F(1) through F(27)

def B(x, b):
  d = []

  while x:
    d.append(str(x % b))
    x //= b


  return ''.join(d)

def F(n):
  if n==1:return 1
  if n==2:return 11
  return B(n,int(F(n-1)))

if __name__ == "__main__":
  for i in range(1,28):

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

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)


return to the top page