
Algebra PreAlgebra and Basic Algebra Math Forum 
 LinkBack  Thread Tools  Display Modes 
January 8th, 2014, 11:32 AM  #1 
Newbie Joined: Jan 2014 Posts: 2 Thanks: 0  How To Generate This Set of numbers?
so I have 1 to 30 I want to have a set of the numbers that contain 1 single digit, 2 teens, and 2 twenties. example 112132126 . I want to cover all bases and it will take me forever to do it manually, so I'm hoping you have some program to do that automatically. 
January 8th, 2014, 01:07 PM  #2 
Global Moderator Joined: Dec 2006 Posts: 18,965 Thanks: 1606 
Why did you say 1 to 30? What's the point in including 30 if you're not interested in numbers beyond the twenties? Also, what is to be done with the generated numbers? Do you want them to be generated randomly, or all possibilities listed in some particular way? Do the "teens" include 10, 11 and 12? 
January 8th, 2014, 01:39 PM  #3  
Math Team Joined: Dec 2006 From: Lexington, MA Posts: 3,267 Thanks: 407  Re: How To Generate This Set of numbers? Hello, vuacobac! Quote:
Are you expecting a printing of the 18,225 possible sets? Do you really want to see all of them?  
January 9th, 2014, 05:36 AM  #4 
Newbie Joined: Jan 2014 Posts: 2 Thanks: 0  Re: How To Generate This Set of numbers?
Thank you all for replying. so here is the real situation. There's a lottery game called Treasure Hunt, my professor and I came up with a system and it did not work and we lost alot of money already. Now I think of another system, which I stated above : 1 single digit, 2 teens, and 2 twenties. therefore I may not need to include the number 30. So if there are 18,225 possible sets from 129 with the format 1 single, 2 teens, 2 twenties then I'm not going to make any profit. Because the jackpot of this game is 10000$ average. 
January 10th, 2014, 12:56 AM  #5 
Global Moderator Joined: Dec 2006 Posts: 18,965 Thanks: 1606 
That's hardly surprising. A lottery jackpot has been won in this way (when the jackpot was high due to a "rollover" from a previous draw when there was no winner). However, the purchaser was lucky to be the only jackpot winner; if someone else had won, the jackpot would have been divided and the bulk purchaser would not have made a profit. Also, the lottery organizers (unreasonably) tried to stop accepting the bulk purchases and not all combinations were purchased in time. However, the combinations already purchased did include the jackpot winning combination, along with numerous winning combinations for smaller prizes.


Tags 
generate, numbers, set 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
How to plot sine wave and generate table  bungouk  Trigonometry  0  December 28th, 2012 11:20 PM 
Help me generate a bell curve, please!  bob9119119  Algebra  24  January 27th, 2012 09:12 PM 
Algorithm to generate sudoku puzzle  mariano_donati  Number Theory  0  September 25th, 2009 07:59 AM 
Function f(i) to generate the ith row of a given matrix  Alef Beth  Abstract Algebra  0  September 1st, 2009 07:37 AM 
how to generate?  edhunter  Advanced Statistics  6  October 20th, 2007 06:35 AM 