input("input the value of n",n): input("input the value of l",l): n:=n+1: X:=[i $ i=0..l]: Y:=combinat::cartesianProduct(X $i=1..n): W:=combinat::cartesianProduct(X $i=1..n): for s from 1 to nops(Y) do for t from 1 to nops(Y) do m:=0: for i from 1 to n do if Y[s][i]=1 and Y[t][i]<>1 then m:=1 end_if: for j from i to n do for k from 1 to n do if Y[s][i]+Y[s][j]=Y[s][k] and Y[t][i]+Y[t][j]<>Y[t][k] then m:=1 end_if: if Y[s][i]*Y[s][j]=Y[s][k] and Y[t][i]*Y[t][j]<>Y[t][k] then m:=1 end_if: end_for: end_for: end_for: if m=0 and max(Y[t][i] $i=1..n)2 then S:=S union {[B[4*i-3],B[4*i-2],B[4*i-1],"*"]} end_if: end_for: m:=2: repeat C:=op(ifactor(m)): W:=[C[2*i+1]-1 $i=1..(nops(C)-1)/2]: T:={}: for i from 1 to nops(W) do for j from 1 to nops(W) do for k from 1 to nops(W) do if W[i]=1 then T:=T union {i} end_if: if W[i]+W[j]=W[k] then T:=T union {[i,j,k,"+"]} end_if: if W[i]*W[j]=W[k] then T:=T union {[i,j,k,"*"]} end_if: end_for: end_for: end_for: m:=m+1: until S minus T={} end_repeat: print(max(W[i] $i=1..nops(W))): Code 2 A loop whose execution does not always terminate, and that defines a partially computable function that cannot be bounded by any computable function from N to N input("input the value of n",n): X:=[0]: while TRUE do Y:=combinat::cartesianProduct(X $i=1..n): W:=combinat::cartesianProduct(X $i=1..n): for s from 1 to nops(Y) do for t from 1 to nops(Y) do m:=0: for i from 1 to n do if Y[s][i]=1 and Y[t][i]<>1 then m:=1 end_if: for j from i to n do for k from 1 to n do if Y[s][i]+Y[s][j]=Y[s][k] and Y[t][i]+Y[t][j]<>Y[t][k] then m:=1 end_if: if Y[s][i]*Y[s][j]=Y[s][k] and Y[t][i]*Y[t][j]<>Y[t][k] then m:=1 end_if: end_for: end_for: end_for: if m=0 and s<>t then W:=listlib::setDifference(W,[Y[s]]) end_if: end_for: end_for: print(max(max(W[z][u] $u=1..n) $z=1..nops(W))): X:=append(X,nops(X)): end_while: Code 3 An infinite computation of a limit-computable function f_2:N\{0}-->N input("input the value of n",n): X:=[0]: while TRUE do Y:=combinat::cartesianProduct(X $i=1..n): W:=combinat::cartesianProduct(X $i=1..n): for s from 1 to nops(Y) do for t from 1 to nops(Y) do m:=0: for i from 1 to n do if Y[s][i]=1 and Y[t][i]<>1 then m:=1 end_if: for j from i to n do for k from 1 to n do if Y[s][i]+Y[s][j]=Y[s][k] and Y[t][i]+Y[t][j]<>Y[t][k] then m:=1 end_if: if Y[s][i]*Y[s][j]=Y[s][k] and Y[t][i]*Y[t][j]<>Y[t][k] then m:=1 end_if: end_for: end_for: end_for: if m=0 and max(Y[t][i] $i=1..n)