Non trivial powers Revisted by recursive

while 1:n=input();print n,"=",;p=1;exec'p+=1;b=int((n+1)**p**-1)\nif b**p==n:print"%i^%%i"%b%p,\n'*20;print

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

download

return to the top page