Post Reply 
Powerball generator
09-14-2024, 01:26 PM (This post was last modified: 09-14-2024 01:27 PM by Joe Horn.)
Post: #1
Powerball generator
A recent thread in the "Not quite" forum discusses generating Powerball numbers on various programmable calculators. The task is almost too easy on the HP Prime in CAS view:

{SORT(rand(5,1,69)),RANDINT(26)}

That's all it takes to generate a Powerball ticket. The undocumented rand(x,y,z) function automatically performs selection without replacement. Example: Sequential outputs after RANDSEED(pi):

{[ 16 18 31 64 67 ], 14 }
{[ 4 26 28 42 68 ], 23 }
{[ 31 40 44 53 67 ], 3 }
and so on.

Disclaimer: Using this method for ticket generation does not improve your chance of winning the lottery. However, buying one ticket instead of no ticket improves your chance of winning by infinity percent.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
09-14-2024, 02:47 PM
Post: #2
RE: Powerball generator
Already had put that in a user key! I rarely use ii (Powerball). I do use the Texas Lottery version in a user key once a week or so…(although I usually use my HP 42S program for that as the HP 42S is much more shirt pocketable!)
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)