Showing posts with label slots. Show all posts
Showing posts with label slots. Show all posts

Sunday, October 31, 2021

Happy Halloween: Belphagor's Prime and Triple Digit Integers

 Happy Halloween: Belphagor's Prime and Triple Digit Integers


Greetings everyone.  And a very Happy Halloween to you, hopefully you are all celebrating, having a great time, staying safe and sane.   


Today, I'm going there, talking about a number with a very dark and evil repetition, better known to religions as the "number of the beast":  six hundred and sixty six.  And to try to balance things out, I'm also going to be talking about a holy number.  


A Prime Evil:  Belphegor's Prime - Starring the Triple Six 


Belphegor's Prime is a large palindrome number:


1000000000000066600000000000001


that has three sixes in the middle of 13 zeroes on other side enclosed by a 1.  A two for one deal, not only the number of the beast but also the presence of a number with a unlucky repetition, 13.  Engineer and mathematician Harvey Dubner determined this monster of a number to be a prime integer.   However, the number received its nefarious name from well-known mathematics and science author Cliff Pickover.   


Who is Belphegor?   In religion, Belphegor is a prince of Hell, whose purpose in demonhood was to trick people into discovery (with a heavy price attached).  


Other connections to the infamous triple six include:


* The sum of the integers 1 to 36.  


* Multiply 2/3 by 1000 and take the integer part (without rounding) to get this number.


*  The triple six can be written has every roman numeral less than 1,000.  


*  It make can property very valuable, such as 666 5th Ave in New York City selling for a then record $1.8 billion, only to be changed to 660 5th Ave sometime later.  

 


Triple Digit Integers - The Glory of Triple Seven


Triple sixes aren't the only number to receive a mythological, metaphysical, or religious repetition.   


For instance, triple sevens, 777, is said to be a very heavenly number.  In Christianity, 777 represents the perfection of Trinity, made up of the Father, Son (Jesus Christ), and the Holy Spirit.  


Maybe the prime factorization of 777, 3 × 7 × 37, is what lead Judaism to declare the numbers 3 and 7 to be "perfect".


Finally, 777 is what brings much happiness to slot players. If you have been a casino, you know why. 


In numerology, triple numbers are promoted to have significance in the new age religion.  111, 222, 333, and so on, are given various meanings depending on the new age writer.  111 and its four digit number "relative", 1111, are very popular in the new age industry, often suggesting completion, oneness with the universe, and positive attraction thoughts. 


Generating Triple Digit Palindrome Numbers


You can generate integers 1 [ n number of zeros ] ddd [ n number of zeroes ] 1, where d is the digit 0 through 9 through the following formula:


10^(2n+4) + d × 111 × 10^(n+1) + 1


Examples:


n = 1, d = 9:   1099901


n = 2, d = 2:   100222001


n = 3, d = 3:   10003330001



No guarantees that the integer you get is prime.  Use at your own risk.  


Sources:


Grundhauser, Eric.  "How a Mathematician Turned an Obscure Number Into a Scary Story"  Atlas Obscura.  August 23, 2016.   Accessed August 1, 2021.  https://www.atlasobscura.com/articles/how-a-mathematician-turned-an-obscure-number-into-a-scary-story


"660 Fifth Avenue".  Wikipedia Last Edited. August 11, 2021.  Accessed August 11, 2021.  https://en.wikipedia.org/wiki/660_Fifth_Avenue


"666 (number)" Wikipedia.  Last Edited July 31, 2021.  Accessed August 9, 2021.  https://en.wikipedia.org/wiki/666_(number)


"777 (number)" Wikipedia.  Last Edited August 6, 2021.  Accessed August 9, 2021. https://en.wikipedia.org/wiki/777_(number)


Three very infamous tarot cards: The Tower, The Devil, Death.  (Gilded Tarot Deck - Ciro Marchetti)

Happy Halloween,


Eddie


All original content copyright, © 2011-2021.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Sunday, June 3, 2018

Sharp EL-5500 III: Slots: Triples and Cherries Pay


Sharp EL-5500 III:  Slots:  Triples and Cherries Pay

BAR | BAR | BAR
   7    |   7    |   7
   🍒  |   🍒   |  🍒

Note: Symbols that are produced by Unicode should, but may not show up on all browsers. Please make sure your browsers are updated to the latest version.  

Take a Spin

This program is a three reel slot simulator, each with ten symbols:

0:  BAR
1:  Cherry (🍒)
2:  Orange
3:  Plum
4:  Bell (🔔)
5:  Lemon (🍋)
6:  Watermelon (🍉)
7:  Seven
8:  Apple (🍎)
9:  Shamrock ()

To see the version for the HP 32SII, please click here:  https://edspi31415.blogspot.com/2018/06/hp-32s-ii-two-versions-of-slots.html

🍒 | 🍒 | 🍒

Each spin has an ante of 25¢.  The results appear in the form 0.###  (ignore the left most 0.)  See the Take a Spin section above for the symbols used in the game.

The payouts are these:

A cherry in any one slot (0.1xy, 0.x1y, or 0.xy1):  $1.00
Any two cherries (0.11x, 0.1x1, 0.x11):  $10.00
Three BARS (0.000):  $35.00  ($15 + $20)
Three Sevens (0.777):  $70.00  ($50 + $20)
Any other triple (0.xxx, x0 and x7):  $20.00

Note: You can use any line numbering system, I used the line numbers 1400-1499 for this program. The first “D” on line 1400 is optional, but is there to make the program a defined program for the EL-5500 III, running it by pressing [DEF] [ D ].  If you are using another calculator, this may not be an option, so ignore the “D” in that case.

Sharp EL-5500 III Program Slots: Triples and Cherries Pay

1400: “D”: PAUSE “Slots”   
1402: CLEAR
1404: INPUT “Bankroll: $”; J
1406: P = 0
1408: J = J - .25
1410: N = .1*(RND 10-1)+.01*(RND 10-1)+.001*(RND 10 – 1)
1412: PRINT USING “########”; 1000*N
1414: S = N/.111
1416: IF (S-INT(S)) = 0 THEN 1450
1418: X = N: GOSUB 1430
1420: X = S: GOSUB 1430
1422: X = S: GOSUB 1430
1424: J = J + INT(TEN (P – 1))  // TEN: 10^x
1426: GOTO 1470

1430: I = INT(X*10)
1432: S = 10*X – I
1434: IF I = 1 THEN LET P = P + 1
1436: RETURN

1450: IF S = 0 THEN LET J = J + 35
1452: IF S = 7 THEN LET J = J + 50
1454: IF S<>0 AND S<>7 THEN LET J = J + 20
1456: GOTO 1470

1470: PRINT “Bank $”; USING “##########.##”; J
1472: INPUT “1 = Again ? :”, C
1474: IF C = 1 THEN 1406
1476: END

Eddie

All original content copyright, © 2011-2018.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.  Please contact the author if you have questions.

HP 32S II: Two Versions of Slots


HP 32S II: Two Versions of Slots

BAR | BAR | BAR
   7    |   7    |   7
   🍒  |   🍒   |  🍒

Note: Symbols that are produced by Unicode should, but may not show up on all browsers. Please make sure your browsers are updated to the latest version.  

Take a Spin

The two programs are three reel slot simulators, each with ten symbols:

0:  BAR
1:  Cherry (🍒)
2:  Orange
3:  Plum
4:  Bell (🔔)
5:  Lemon (🍋)
6:  Watermelon (🍉)
7:  Seven
8:  Apple (🍎)
9:  Shamrock ()

Slots Version 1:  Classic Adapted Version

This version is adapted from the HP-19C/HP-29C Games Solutions: Games book, which in turn, the original program was adapted from HP-65 user program by Craig A. Pearce.

Each spin has an ante of 10¢.  The results appear in the form 0.###  (ignore the left most 0.)

The payouts are these:

Cherry on the first slot, 0.1xy ( 🍒 | any | any ):  20¢
Cherry on the first two slots 0.11x ( 🍒 | 🍒 | any ):  30¢
Three of a kind other than cherries, 0.xxx where x≥2:  $1.00
Non-cherry symbol on the first two slots, BAR on the third, 0.xx0 where x≥2:  $1.00
Three BARS, 0.000:  $10.00

To operate:

1.  Initialize:  XEQ S
2.  Spin:  XEQ J
3.  Check your winnings or losses:  XEQ K

HP 32S II Program Classic Slots
(115.5 bytes)

// initialize (4.5 bytes)
S01 LBL S
S02 CLVARS
S03 STOP (R/S)

// spin (40.5 bytes)
J01 LBL J
J02 FIX 3
J03 RANDOM
J04 STO N
J05 XEQ T
J06 STO K
J07 –
J08 XEQ T
J09 STO L
J10 –
J11 XEQ T
J12 STO M
J13 1
J14 RCL K   // check for cherries
J15 x=y?
J16 GTO O
J17 RCL L
J18 xy?
J19 GTO P
J20 RCL M
J21 xy?
J22 GTO Q
J23 1
J24 XEQ U
J25 1
J26 STO U
J27 R

// three of kind check (7.5 bytes)
Q01 LBL Q
Q02 x0?
Q03 GTO P
Q04 9
Q05 DSE U

// pay the ante of 10 cents (12.5 bytes)
P01 LBL P
P02 RCL N
P03 -0.1

// accounting of the pot (6.0 bytes)
U01 LBL U
U02 STO+ J
U03 R
U04 RTN

// cherry routine (29.5 bytes)
O01 LBL O
O02 0.2
O03 XEQ U
O04 RCL L
O05 xy?
O06 GTO P
O07 0.3
O08 XEQ U
O09 GTO P

// peel digits from the spin (9.0 bytes)
T01 LBL T
T02 10
T03 *
T04 ENTER
T05 IP
T06 RTN

// recall pot (6.0 bytes)
K01 LBL K
K02 RCL J
K03 FIX 2
K04 STOP (R/S)

Source: HP-19C/29-C Solutions: Games. Hewlett Packard.  1977


Slots Version 2:  Cherries and Triples Pay 

🍒 | 🍒 | 🍒

Each spin has an ante of 25¢.  The results appear in the form 0.###  (ignore the left most 0.)  See the Take a Spin section above for the symbols used in the game.

The payouts are these:

A cherry in any one slot (0.1xy, 0.x1y, or 0.xy1):  $1.00
Any two cherries (0.11x, 0.1x1, 0.x11):  $10.00
Three BARS (0.000):  $35.00  ($15 + $20)
Three Sevens (0.777):  $70.00  ($50 + $20)
Any other triple (0.xxx, x0 and x7):  $20.00

To operate:

1.  Initialize and store your bank roll:  XEQ S
2.  Spin:  XEQ J.  The results of the slot and the resulting bank roll will automatically be displayed.

HP 32S II Program Cherries and Triples Pay
(124.0 bytes)

// initialization (6.0 bytes)
S01 LBL S
S02 CLRVARS
S03 STO J
S04 STOP (R/S)

// spin (62.5 bytes)
J01 LBL J
J02 0
J03 STO P // store in P
J04 0.25  // ante
J05 STO- J
J06 FIX 3
J07 RANDOM
J08 RND  // round to display settings
J09 PSE
J10 PSE
J11 PSE
J12 STO N
J13 0.111  // check for triple
J14 ÷
J15 STO S
J16 FP
J17 x=0?
J18 GTO T
J19 RCL N  // count for cherries
J20 XEQ P
J21 RCL S
J22 XEQ P
J23 RCL S
J24 XEQ P
J25 RCL P
J26 1
J27 –
J28 10^x 
J29 IP
J30 STO+ J
J31 GTO U

// count cherries (21.0 bytes)
P01 LBL P
P02 10
P03 *
P04 ENTER
P05 IP
P06 –
P07 STO O
P08 LASTx
P09 1
P10 xy?
P11 RTN
P12 1
P13 STO+ P
P14 RTN

// check the triple (16.5 bytes)
T01 LBL T
T02 RCL S
T03 x=0? // 3 bars
T04 XEQ K
T05 RCL S
T06 7
T07 x=y? // 3 sevens
T08 XEQ L
T09 20
T10 STO+ J
T11 GTO U

// add bonus for 3 bars (6.0 bytes)
K01 LBL K
K02 15
K03 STO+ J
K04 RTN

// add bonus for 3 sevens (6.0 bytes)
L01 LBL L
L02 50
L03 STO+ J
L04 RTN

/// show balance (6.0 bytes)
U01 LBL U
U02 RCL J
U03 FIX 2
U04 STOP (R/S)

Good luck!

Eddie

All original content copyright, © 2011-2018.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.  Please contact the author if you have questions.

DM42 and HP 42S: Quadratic Equation, Characteristic Polynomial, and Eigenvalues

DM42 and HP 42S: Quadratic Equation, Characteristic Polynomial, and Eigenvalues The programs are listed for the Swiss Micros DM42 an...