If you would like, you can download a copy of Libery BASIC v4.02 and take my code and play around with it in the compiler... You can change the computation code for different results if you like.
copy and paste this into the compiler and run it.....
nomainwin
WindowWidth = 700
WindowHeight = 600
UpperLeftX = 100
UpperLeftY = 150
statictext #math.x, "x =", 25, 20, 25, 25
textbox #math.primer, 50, 15, 50, 25
'first column of boxes for the value of x and it's permutations
textbox #math.aa, 50, 60, 50, 25
textbox #math.bb, 50, 90, 50, 25
textbox #math.cc, 50, 120, 50, 25
textbox #math.dd, 50, 150, 50, 25
textbox #math.ee, 50, 180, 50, 25
textbox #math.ff, 50, 210, 50, 25
'second column of boxes for the result of x and it's permutations
statictext #math.equala, "x/pi+666", 120, 20, 70, 25
textbox #math.resulta1, 120, 60, 50, 25
textbox #math.resulta2, 120, 90, 50, 25
textbox #math.resulta3, 120, 120, 50, 25
textbox #math.resulta4, 120, 150, 50, 25
textbox #math.resulta5, 120, 180, 50, 25
textbox #math.resulta6, 120, 210, 50, 25
'third column of boxes for the result of x and it's permutations
statictext #math.equalb, "x/pi-666", 190, 20, 70, 25
textbox #math.resultb1, 190, 60, 50, 25
textbox #math.resultb2, 190, 90, 50, 25
textbox #math.resultb3, 190, 120, 50, 25
textbox #math.resultb4, 190, 150, 50, 25
textbox #math.resultb5, 190, 180, 50, 25
textbox #math.resultb6, 190, 210, 50, 25
'forth column of boxes for the result of x and it's permutations
statictext #math.equalc, "(x+666)/pi", 260, 20, 70, 25
textbox #math.resultc1, 260, 60, 50, 25
textbox #math.resultc2, 260, 90, 50, 25
textbox #math.resultc3, 260, 120, 50, 25
textbox #math.resultc4, 260, 150, 50, 25
textbox #math.resultc5, 260, 180, 50, 25
textbox #math.resultc6, 260, 210, 50, 25
'fifth column of boxes for the result of x and it's permutations
statictext #math.equald, "(x-666)/pi", 330, 20, 70, 25
textbox #math.resultd1, 330, 60, 50, 25
textbox #math.resultd2, 330, 90, 50, 25
textbox #math.resultd3, 330, 120, 50, 25
textbox #math.resultd4, 330, 150, 50, 25
textbox #math.resultd5, 330, 180, 50, 25
textbox #math.resultd6, 330, 210, 50, 25
button #math.permutate, "Permutate", [permutate], UL, 50, 250, 100, 25
button #math.clear, "Clear", [clear], UL, 280, 250, 100, 25
button #math.edit, "Clear Editor", [clearedit], UL, 532, 15, 118, 25
button #math.save, "Save Editor", [save], UL, 400, 15, 118, 25
button #math.compute, "Compute", [compute], UL, 165, 250, 100, 25
texteditor #math.edit, 400, 60, 250, 470
'instructions..................................................................
statictext #math.howto, "Input any three digit number into the box next to x =.", 50, 285, 350, 27
statictext #math.howto, "Press the Permutate button to generate all combinations of that number.", 50, 305, 350, 27
statictext #math.howto, "Now, press the Compute button to generate the results of the computations.", 50, 325, 350, 27
statictext #math.howto, "The results are displayed next to their corresponding permutation as well as in the text editor.", 50, 355, 350, 27
statictext #math.howto, "Press Clear to generate results for a new number. The text editor will continue to add new results to your previous ones.", 50, 385, 350, 27
statictext #math.howto, "Press Save Editor to save text editor results to a text file in the location of your choice.", 50, 415, 350, 27
statictext #math.howto, "Press Clear Editor to delete the results from the text editor.", 50, 445, 350, 27
statictext #math.howto, "The idea behind this program is to build a database of all possible numbers and their permutations using the values of x as primers which may lead to the next winning number.", 50, 465, 340, 40
statictext #math.howto, "Happy Hunting! -sfilippo- All Rights Reserved - and don't whine at me if your computer fries from this program. I just do this as a hobby.", 50, 510, 340, 45
open "Easy Devil" for window_nf as #math
print #math, "trapclose [quit]"
[mainLoop]
print #math.primer, "!setfocus"
wait
[permutate]
'read the input textbox
print #math.primer, "!contents? num$"
'split the number
a$=left$(num$,1)
b$=mid$(num$,2,1)
c$=right$(num$,1)
'do the permutations
numa$=a$+b$+c$
numb$=a$+c$+b$
numc$=b$+a$+c$
numd$=b$+c$+a$
nume$=c$+a$+b$
numf$=c$+b$+a$
'print to the output textboxes
print #math.aa, numa$
print #math.bb, numb$
print #math.cc, numc$
print #math.dd, numd$
print #math.ee, nume$
print #math.ff, numf$
wait
[compute]
print #math.aa, "!contents? aa$"
aa = val(aa$)
print #math.bb, "!contents? bb$"
bb = val(bb$)
print #math.cc, "!contents? cc$"
cc = val(cc$)
print #math.dd, "!contents? dd$"
dd = val(dd$)
print #math.ee, "!contents? ee$"
ee = val(ee$)
print #math.ff, "!contents? ff$"
ff = val(ff$)
print #math.edit, aa; " Results are..."
print #math.edit, ""
ans = aa /3.14159 + 666
print #math.resulta1, dp$(ans)
print #math.edit, dp$(ans)
ans = bb /3.14159 + 666
print #math.resulta2, dp$(ans)
print #math.edit, dp$(ans)
ans = cc /3.14159 + 666
print #math.resulta3, dp$(ans)
print #math.edit, dp$(ans)
ans = dd /3.14159 + 666
print #math.resulta4, dp$(ans)
print #math.edit, dp$(ans)
ans = ee /3.14159 + 666
print #math.resulta5, dp$(ans)
print #math.edit, dp$(ans)
ans = ff /3.14159 + 666
print #math.resulta6, dp$(ans)
print #math.edit, dp$(ans)
ans = aa /3.14159 - 666
print #math.resultb1, dp$(ans)
print #math.edit, dp$(ans)
ans = bb /3.14159 - 666
print #math.resultb2, dp$(ans)
print #math.edit, dp$(ans)
ans = cc /3.14159 - 666
print #math.resultb3, dp$(ans)
print #math.edit, dp$(ans)
ans = dd /3.14159 - 666
print #math.resultb4, dp$(ans)
print #math.edit, dp$(ans)
ans = ee /3.14159 - 666
print #math.resultb5, dp$(ans)
print #math.edit, dp$(ans)
ans = ff /3.14159 - 666
print #math.resultb6, dp$(ans)
print #math.edit, dp$(ans)
ans = (aa + 666) / 3.14159
print #math.resultc1, dp$(ans)
print #math.edit, dp$(ans)
ans = (bb + 666) / 3.14159
print #math.resultc2, dp$(ans)
print #math.edit, dp$(ans)
ans = (cc + 666) / 3.14159
print #math.resultc3, dp$(ans)
print #math.edit, dp$(ans)
ans = (dd + 666) / 3.14159
print #math.resultc4, dp$(ans)
print #math.edit, dp$(ans)
ans = (ee + 666) / 3.14159
print #math.resultc5, dp$(ans)
print #math.edit, dp$(ans)
ans = (ff + 666) / 3.14159
print #math.resultc6, dp$(ans)
print #math.edit, dp$(ans)
ans = (aa - 666) / 3.14159
print #math.resultd1, dp$(ans)
print #math.edit, dp$(ans)
ans = (bb - 666) / 3.14159
print #math.resultd2, dp$(ans)
print #math.edit, dp$(ans)
ans = (cc - 666) / 3.14159
print #math.resultd3, dp$(ans)
print #math.edit, dp$(ans)
ans = (dd - 666) / 3.14159
print #math.resultd4, dp$(ans)
print #math.edit, dp$(ans)
ans = (ee - 666) / 3.14159
print #math.resultd5, dp$(ans)
print #math.edit, dp$(ans)
ans = (ff - 666) / 3.14159
print #math.resultd6, dp$(ans)
print #math.edit, dp$(ans)
print #math.edit, ""
print #math.edit, ""
wait
[clear]
print #math.primer, ""
print #math.aa, ""
print #math.bb, ""
print #math.cc, ""
print #math.dd, ""
print #math.ee, ""
print #math.ff, ""
print #math.resulta1, ""
print #math.resulta2, ""
print #math.resulta3, ""
print #math.resulta4, ""
print #math.resulta5, ""
print #math.resulta6, ""
print #math.resultb1, ""
print #math.resultb2, ""
print #math.resultb3, ""
print #math.resultb4, ""
print #math.resultb5, ""
print #math.resultb6, ""
print #math.resultc1, ""
print #math.resultc2, ""
print #math.resultc3, ""
print #math.resultc4, ""
print #math.resultc5, ""
print #math.resultc6, ""
print #math.resultd1, ""
print #math.resultd2, ""
print #math.resultd3, ""
print #math.resultd4, ""
print #math.resultd5, ""
print #math.resultd6, ""
wait
[save]
filedialog "Save Results as ...", "*.*", FileName$
if FileName$ <> "" then
print #math.edit, "!contents? contents$"
open FileName$ for output as #Results
#Results contents$
close #Results
notice "File saved as ..."; chr$(13); FileName$
end if
wait
[clearedit]
print #math.edit, "!cls"
wait
[quit]
confirm "Are you sure you want to QUIT Easy Devil?"; answer$
if answer$ = "no" then [mainLoop]
close #math
end
function dp$(nbr)
dp$ = trim$(using("###.", nbr))
end function