#!/usr/local/bin/python2 def ack2(M, N): return (N + 1) if M == 0 else ( (N + 2) if M == 1 else ( (2*N + 3) if M == 2 else ( (8*(2**N - 1) + 5) if M == 3 else ( ack2(M-1, 1) if N == 0 else ack2(M-1, ack2(M, N-1)))))) print ack2(0,0) # 1 print ack2(3,5) # 253 print ack2(4,0) # 13 print ack2(4,1) # 65533 print ack2(4,2) # 200352.... wie in Common Lisp