import math def base10_anybase(n,bf): a=0 while bf**a-1: dig=(n-(n%(bf**a)))/(bf**a) n=n-dig*bf**a num.append(int(dig)) a+=-1 return num def makelist(num,c): converted=[] base=2 j=math.ceil((num)**(1/(c-1))) while basec-1: converted.append([k,base]) base+=1 return converted def testlist(a,n,c): global count global mcheck global mdata justnum=[] for i in range(0,len(a)): justnum.append(a[i][0]) for i in range(0,len(justnum)): pal=[] for j in range(1,len(justnum[i])+1): pal.append(justnum[i][-j]) while pal[0]==0: pal.remove(0) if pal!=justnum[i]: if pal in justnum: for t in range(0,len(justnum)): if justnum[t]==pal: ji=t w=a[i][1] q=a[ji][1] qlist=[int(i) for i in str(q)] wlist=[int(i)for i in str(w)] wpal=[] for g in range(1,len(wlist)+1): wpal.append(wlist[-g]) while wpal[0]==0: wpal.remove(0) if wpal==qlist: if n not in mcheck: print(count, n,a[i],a[ji]) mcheck.append(n) mdata.append([n,a[i],a[ji]]) count+=.5 def main(c,top): n=2 global count global mcheck global mdata mcheck=[] mdata=[] count=1 while n