LOCATE 5, 1: PRINT "PRESS ANY KEY TO EXIT" DO UNTIL INKEY$ <> "" LOOP GOTO END1

END1: SYSTEM

'FUNCTION BY GILLION FUNCTION Factorial# (n AS DOUBLE) CONST maxNToCache = 99 STATIC resultCache() AS DOUBLE STATIC FIRSTCALL AS INTEGER IF firstCall = 0 THEN firstCall = -1 REDIM resultCache(maxNToCache) AS DOUBLE resultCache(0) = 1 resultCache(1) = 1 resultCache(2) = 2 END IF IF n <= maxNToCache THEN IF resultCache(n) <> 0 THEN Factorial = resultCache(n) EXIT FUNCTION END IF END IF resultCache(n) = INT(n) * Factorial(INT(n) - 1) Factorial = resultCache(n) END FUNCTION

LOCATE 3, 1: INPUT "Enter 1ST number ->", A LOCATE 4, 1: INPUT "Enter 2ND number ->", B LOCATE 5, 1: INPUT "Enter 3RD number ->", C LOCATE 6, 1: INPUT "Enter 4TH number ->", D LOCATE 7, 1: INPUT "Enter 5TH number ->", E IF PICKT = 6 THEN LOCATE 8, 1: INPUT "Enter 6TH number ->", F LEX1 = NCR L3 = 1 L1 = PICKT NEXTLEX: IF L3 = 1 THEN LV = (NSET - A) IF L3 = 2 THEN LV = (NSET - B) IF L3 = 3 THEN LV = (NSET - C) IF L3 = 4 THEN LV = (NSET - D) IF L3 = 5 THEN LV = (NSET - E) IF L3 = 6 THEN LV = (NSET - F) L2 = (LV - L1) L4 = 0 IF L2 > 0 THEN L4 = Factorial(LV) / (Factorial(L1) * Factorial(L2)) L4 = CLNG(L4) LEX1 = (LEX1 - L4) L1 = (L1 - 1) L3 = L3 + 1 IF L3 <= PICKT THEN GOTO NEXTLEX LEX1$ = PAD1$ + LTRIM$(STR$(LEX1)) LEX1$ = RIGHT$(LEX1$, LNCR) IF PICKT = 5 THEN LOCATE 8, 1: PRINT "LEXI ="; LEX1$; " SET = "; A; B; C; D; E; "" IF PICKT = 6 THEN LOCATE 9, 1: PRINT "LEXI ="; LEX1$; " SET = "; A; B; C; D; E; F; "" LOCATE 10, 1: PRINT "PRESS ANY KEY TO EXIT"

DO UNTIL INKEY$ <> "" LOOP GOTO END1 END1: SYSTEM

'fUNCTION BY GILLION FUNCTION Factorial# (n AS DOUBLE) CONST maxNToCache = 99 STATIC resultCache() AS DOUBLE STATIC FIRSTCALL AS INTEGER IF firstCall = 0 THEN firstCall = -1 REDIM resultCache(maxNToCache) AS DOUBLE resultCache(0) = 1 resultCache(1) = 1 resultCache(2) = 2 END IF IF n <= maxNToCache THEN IF resultCache(n) <> 0 THEN Factorial = resultCache(n) EXIT FUNCTION END IF END IF resultCache(n) = INT(n) * Factorial(INT(n) - 1) Factorial = resultCache(n) END FUNCTION

United States Member #59354 March 13, 2008 3968 Posts Offline

Posted: April 24, 2011, 3:26 am - IP Logged

A little better version

'Code to convert lexi to numbers

DIM SHARED NC1 AS DOUBLE DIM SHARED NCR AS DOUBLE DIM SHARED LEX1 AS DOUBLE

LEXTOSET: CLS 'Load matrix varibles LOCATE 1, 1: INPUT "ENTER LEXI VALUE ", LEX1 LOCATE 2, 1: INPUT "ENTER NUMBERS IN EACH SET ", PICKT LOCATE 3, 1: INPUT "ENTER MUNBERS IN MATRIX ", NSET IF PICKT < 3 OR PICKT > 6 THEN GOTO LEXTOSET IF NSET < PICKT + 1 OR NEST > 60 THEN GOTO LEXTOSET 'Calculate / set varibles NCR = Factorial(NSET) / (Factorial(PICKT) * Factorial(NSET - PICKT)): NCR = CLNG(NCR) IF LEX1 > NCR THEN GOTO LEXTOSET LNCR = LEN(LTRIM$(STR$(NCR))) SET1$ = "": L1 = NSET: LEXHI = NCR - LEX1

'Conversion code NEXTNUM: NC1 = Factorial(L1) / (Factorial(PICKT) * Factorial(L1 - PICKT)): NC1 = CLNG(NC1) DO UNTIL NC1 <= LEXHI L1 = L1 - 1: IF L1 <= (PICKT - 1) THEN EXIT DO NC1 = Factorial(L1) / (Factorial(PICKT) * Factorial(L1 - PICKT)): NC1 = CLNG(NC1) LOOP IF (NSET - L1) < 10 THEN SET1$ = SET1$ + "0" + LTRIM$(STR$(NSET - L1)) + " " IF (NSET - L1) > 9 THEN SET1$ = SET1$ + LTRIM$(STR$(NSET - L1)) + " " LEXHI = LEXHI - NC1: PICKT = PICKT - 1 IF PICKT > 0 THEN GOTO NEXTNUM

'Output code PLEX$ = "00000000" + LTRIM$(STR$(LEX1)) LOCATE 4, 1: PRINT "LEXI = "; RIGHT$(PLEX$, LNCR); " SET = "; SET1$ LOCATE 5, 1: PRINT "PRESS ANY KEY TO EXIT" DO UNTIL INKEY$ <> "" LOOP GOTO END1

END1: SYSTEM

'Factorial Function By Gillion FUNCTION Factorial# (n AS DOUBLE) CONST maxNToCache = 99 STATIC resultCache() AS DOUBLE STATIC FIRSTCALL AS INTEGER IF firstCall = 0 THEN firstCall = -1 REDIM resultCache(maxNToCache) AS DOUBLE resultCache(0) = 1 resultCache(1) = 1 resultCache(2) = 2 END IF IF n <= maxNToCache THEN IF resultCache(n) <> 0 THEN Factorial = resultCache(n) EXIT FUNCTION END IF END IF resultCache(n) = INT(n) * Factorial(INT(n) - 1) Factorial = resultCache(n) END FUNCTION

United States Member #59354 March 13, 2008 3968 Posts Offline

Posted: April 24, 2011, 3:27 am - IP Logged

'CODE TO CONVERT THE NUMBERS TO LEXI

DIM SHARED NCR AS DOUBLE DIM SHARED NC1 AS DOUBLE DIM SHARED LEX1 AS DOUBLE

SETTOLEX: CLS 'Load varibles A = 0: B = 0: C = 0: D = 0: E = 0: F = 0: LOCATE 1, 1: INPUT "ENTER NUMBERS IN EACH SET ", PICKT IF PICKT < 3 OR PICKT > 6 THEN GOTO SETTOLEX LOCATE 2, 1: INPUT "ENTER MUNBERS IN MATRIX ", NSET IF NSET < PICKT + 1 OR NSET > 60 THEN GOTO SETTOLEX NCR = Factorial(NSET) / (Factorial(PICKT) * Factorial(NSET - PICKT)): NCR = CLNG(NCR) LNCR = LEN(LTRIM$(STR$(NCR))) IF PICKT >= 1 THEN LOCATE 3, 1: INPUT "Enter 1ST number ->", A IF PICKT >= 2 THEN LOCATE 4, 1: INPUT "Enter 2ND number ->", B IF PICKT >= 3 THEN LOCATE 5, 1: INPUT "Enter 3RD number ->", C IF PICKT >= 4 THEN LOCATE 6, 1: INPUT "Enter 4TH number ->", D IF PICKT >= 5 THEN LOCATE 7, 1: INPUT "Enter 5TH number ->", E IF PICKT >= 6 THEN LOCATE 8, 1: INPUT "Enter 6TH number ->", F LEX1 = NCR: LNUM = 1: L1 = PICKT

'conversion code NEXTLEX: IF LNUM = 1 THEN LV = (NSET - A) IF LNUM = 2 THEN LV = (NSET - B) IF LNUM = 3 THEN LV = (NSET - C) IF LNUM = 4 THEN LV = (NSET - D) IF LNUM = 5 THEN LV = (NSET - E) IF LNUM = 6 THEN LV = (NSET - F) L2 = (LV - L1): NC1 = 0 IF L2 > 0 THEN NC1 = Factorial(LV) / (Factorial(L1) * Factorial(L2)): NC1 = CLNG(NC1) LEX1 = (LEX1 - NC1): L1 = (L1 - 1): LNUM = LNUM + 1 IF LNUM <= PICKT THEN GOTO NEXTLEX

'Output/Print code LEX1$ = "00000000" + LTRIM$(STR$(LEX1)) LEX1$ = RIGHT$(LEX1$, LNCR) SET$ = "" IF A > 0 AND A < 10 THEN SET$ = SET$ + "0" + LTRIM$(STR$(A)) + " " IF A > 9 THEN SET$ = SET$ + LTRIM$(STR$(A)) + " " IF B > 0 AND B < 10 THEN SET$ = SET$ + "0" + LTRIM$(STR$(B)) + " " IF B > 9 THEN SET$ = SET$ + LTRIM$(STR$(B)) + " " IF C > 0 AND C < 10 THEN SET$ = SET$ + "0" + LTRIM$(STR$(C)) + " " IF C > 9 THEN SET$ = SET$ + LTRIM$(STR$(C)) + " " IF D > 0 AND D < 10 THEN SET$ = SET$ + "0" + LTRIM$(STR$(D)) + " " IF D > 9 THEN SET$ = SET$ + LTRIM$(STR$(D)) + " " IF E > 0 AND E < 10 THEN SET$ = SET$ + "0" + LTRIM$(STR$(E)) + " " IF E > 9 THEN SET$ = SET$ + LTRIM$(STR$(E)) + " " IF F > 0 AND F < 10 THEN SET$ = SET$ + "0" + LTRIM$(STR$(F)) + " " IF F > 9 THEN SET$ = SET$ + LTRIM$(STR$(F)) + " " LOCATE PICKT + 3, 1: PRINT "LEXI ="; LEX1$; " SET = "; SET$; ""

'Exit code LOCATE PICKT + 4, 1: PRINT "PRESS ANY KEY TO EXIT" DO UNTIL INKEY$ <> "" LOOP GOTO END1 END1: SYSTEM

'Factorial Function by Gillion

FUNCTION Factorial# (n AS DOUBLE) CONST maxNToCache = 99 STATIC resultCache() AS DOUBLE STATIC FIRSTCALL AS INTEGER IF firstCall = 0 THEN firstCall = -1 REDIM resultCache(maxNToCache) AS DOUBLE resultCache(0) = 1 resultCache(1) = 1 resultCache(2) = 2 END IF IF n <= maxNToCache THEN IF resultCache(n) <> 0 THEN Factorial = resultCache(n) EXIT FUNCTION END IF END IF resultCache(n) = INT(n) * Factorial(INT(n) - 1) Factorial = resultCache(n) END FUNCTION

Krakow Poland Member #86302 February 2, 2010 859 Posts Offline

Posted: April 26, 2011, 11:58 am - IP Logged

Quote: Originally posted by RL-RANDOMLOGIC on April 26, 2011

The lexi program has been downloaded by many people so now I want to see where we are at before I

continue this thread. As the program is, it has no way to track past results but if enough intrest is shown

I will write a database builder for this program. Each person will need to get access to a list of draws for

the game/s that they want to play. I will also add to the existing program a way to update the database

after each drawing. Here's what I had in mind. If by recording the past results and searching this data

one can extract a range for FL & RL then from this point it would be very easy to produce a system that

could show a profit every play. Lets use a simulation where FL produced 01 and RL produced 39. This is

the first and last number in my game. There are 37 numbers left from which to fill out the other 3 numbers

needed in each set. These 37 numbers could be arranged into 12 groups of 3 with one number being left

over. If you wanted to cover every number then you would need 13 lines with one of the lines having 2

numbers that occure more then once. The numbers could be arranged in any matter as long as all the

numbers are used at least one time.

Example

01 02 03 04 39

01 05 06 07 39

01 08 09 10 39

01 11 12 13 39

01 14 15 16 39

01 17 18 19 39

01 20 21 22 39

01 23 24 25 39

01 26 27 28 39

01 29 30 31 39

01 32 33 34 39

01 35 36 37 39

01 xx xx 38 39 xx = any number taken from above except 01 or 39

Notice that 13 lines are needed to cover all the numbers.

Using this method and if your FL & RL are correct then every set would hava at least a 2 of 5 match. You would also

have these results

12ea. 2 of 5's and 1ea. 5 of 5 winnings = $JP + $12.00

or

10ea. 2 of 5's and 3ea. 3 of 5's winnings = $40.00

or

11ea 2 of 5's and 1ea 3 of 5 and 1 each 4 of 5 winnings = $261.00

Depending on the xx numbers chosen you could win even more.

You can see from this that if I can select the FL and RL range so that it produces one number for each then

as long as I cover every remaining number in the middle 3 then I will always win more then invested. The

middle 3 numbers can be arranged in any order and you will still get one of the results shown above. Games

with fewer then 39 numbers can have even fewer lines. The first and last number used will determind how

many lines are needed. My 5-39 game requires 13 lines max but could be far fewer depending on which first

and last numbers are used.

I often range my FL and RL by this method. min = 000 and max = 575. Looking at the first digit I select HI or Low

low = 0-1-2 Hi = 3-4-5 . Lets say that I select "Low" meaning that my first digit will be 0-1-2. I now select odd

or even, meaning odd = 1 and even = 0 & 2. For this example lets say that I select (LOW) and (ODD) this means

that I will play (1) as the first digit. Now for the next two digits. The value for these two digits can be 00 to 99.

I again do the same as the first step above and select Low = 00 to 49 or 50 to 99. Most days this is a 50/50

choice. If I select low then my FL range would be 100 to 149. If my first value is 4 then I might need to range

my choice again. Example lets say that my first digit for FL = 4 and my second range was 00 to 49. I would run

using 400 to 449. If this gives me more then one number then I would take the 00 to 49 and divide it again using

low / hi. I now have 00 to 24.5 to 24.6 to 49. I would round up and have 00 to 25 and 25 to 49. Lets say that I

chose low again I now have 400 to 425. I now run again and see what I end up with. Each choice here is conditional

but I think that you can see the game plan.

When doing something like this I only know if anyone is interested by the replies I get. If enough people show

interest then I will continue else I wil take silence as a "not interested"

Thanks RL

RL,

Pls count me in. I'm interested in using Lexi. Some games could be easier to set the range and some a bit harder. For example, for my 5/42 the odds for 3 digits are 1 to 850, then combined odds for 2 pick-3 games would be 1:722,500 so better than for a regular game which is 1: 850,668.

Still this leaves us with a question of using best method to set the ranges. I'm not sure if feelings would do the trick, perhaps looking at some filter values for digits, say if 1-st digit goes up 3 times in a row it should either stay at this level or fall down. Has anyone tried it with pick-3? I never played this game myself, as it's simply nonexistent where I live.

United States Member #59354 March 13, 2008 3968 Posts Offline

Posted: April 27, 2011, 1:57 am - IP Logged

Adam

Still this leaves us with a question of using best method to set the ranges. I'm not sure if feelings would do the trick, perhaps looking at some filter values for digits, say if 1-st digit goes up 3 times in a row it should either stay at this level or fall down. Has anyone tried it with pick-3? I never played this game myself, as it's simply nonexistent where I live.

The feelings are all we have even after we look a tons of data. We feel one way or another about what we will play.

If you find information where I don't have to make a decision I would love to hear about it.

Krakow Poland Member #86302 February 2, 2010 859 Posts Offline

Posted: April 27, 2011, 4:07 am - IP Logged

Quote: Originally posted by RL-RANDOMLOGIC on April 27, 2011

Adam

Still this leaves us with a question of using best method to set the ranges. I'm not sure if feelings would do the trick, perhaps looking at some filter values for digits, say if 1-st digit goes up 3 times in a row it should either stay at this level or fall down. Has anyone tried it with pick-3? I never played this game myself, as it's simply nonexistent where I live.

The feelings are all we have even after we look a tons of data. We feel one way or another about what we will play.

If you find information where I don't have to make a decision I would love to hear about it.

RL

RL,

Pls accept my apologies as I didn't mean to be rude if that sounded so. Yes, you make decision at every step of the process. What was on my mind was actually a quest for something tangible, for example as far as selecting the first digit of FL. Let's say that my last Lexcon value was: 155448. Can this help me in any way as I have to choose in the range 0-8? And should I look at the one before the last which was 511672?