# drop i-th digit from a list of digits in human order drop:=proc(lis,i) local b,j,jj,k,L; L:=nops(lis); b:=0; jj:=1; for j from 1 to L do k:=L-j+1; if k <> i then b := b+lis[k]*10^(jj-1); jj:=jj+1; fi; od; b; end; # compute A291093/A291094 # myconvert(n,base) is the same as convert(n,base,10) and then reverse the order of the digits, i.e., it puts the digits in human order ans:=[]; for d from 11 to 500 do d1:=myconvert(d,10); Ld:=nops(d1); for n from 10 to d-1 do n1:=myconvert(n,10); Ln:=nops(n1); r:=n/d; for i from 1 to Ln do dig:=n1[i]; nR:=drop(n1,i); for j from 1 to Ld do dR:=drop(d1,j); if d1[j]=dig and dR <> 0 and nR/dR=r then if not (dig=0 and i=Ln and j=Ld) and not (n1[Ln]=0 and d1[Ld]=0) then ans:=[op(ans),[n1,d1]]; fi; fi; od: od: od: od: ans;