Showing posts with label combinatorics. Show all posts
Showing posts with label combinatorics. Show all posts

Saturday, August 8, 2026

Python: Combination Functions (Micropython)

Python: Combination Functions (Micropython)


This is a set of combination functions. Programmed with a Casio fx-CG 100 but should work on any calculator with Python.


The script is freeware.


Functions included:


 fact(n): Factorial of the non-negative integer n. Some math modules include a factorial function, like Numworks. This function will be used in all the functions on this script.


ncr(n,r): Combination


npr(n,r): Permutation


nhr(n,r): Combination, repetitions are allowed


catalan(n): nth Catalan Number


narayana(n,k): Narayana Number (n, k are positive integers)


binpdf(n,k,p): Binomial Probability:

n: trials

k: number of successes

p: probability of success


bndcdf(n,k,p): Cumulative Binomial Probability – Lower Tail

n: trials

k: number of successes (from 0 to k)

p: probability of success



Script: combo.py

'''

combinatorics 4/12/2026

Edward Shore


round to nearest integer:

int(f+.5)

'''


from math import *


# factorial positive integers

def fact(n):

  f,i=1,1

  while i<=n:

    f*=i

    i+=1

  return int(f+.5)


# a lot of functions will use fact


# combination

def ncr(n,r):

  f=fact(n)/(fact(r)*fact(n-r))

  return int(f+.5)


# permutation

def npr(n,r):

  f=fact(n)/fact(n-r)

  return int(f+.5)


# combination w/repetitions

def nhr(n,r):

  f=fact(n+r-1)/(fact(r)*fact(n-1))

  return int(f+.5)


# catalan numbers

def catalan(n):

  f=fact(2*n)/(fact(n)**2*(n+1))

  return int(f+.5)


# narayana numbers

def narayana(n,k):

  f=1/n*ncr(n,k)*ncr(n,k-1)

  return int(f+.5)


# binomial probability

def binpdf(n,k,p):

  # p=prob

  f=ncr(n,k)*p**k*(1-p)**(n-k)

  return f


# bin lower tail

def bincdf(n,k,p):

  # 0 to k, p=prob

  s=0

  for i in range(k+1):

    s+=binpdf(n,i,p)

  return s



Eddie


All original content copyright, © 2011-2026. 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.


Monday, September 6, 2021

Swiss Micros DM42: Subfactorial and Numworks Update (16.3)

Swiss Micros DM42: Subfactorial


Happy Labor Day!


This is a request by Marko Draisma and gratitude to Mr. Draisma.


Calculating the Subfactorial


A common,  and perhaps the most straight forward, formula to calculate the subfactorial is:  


!n = n! × Σ((-1)^k ÷ k!, k=0 to n)


Yes, the subfactorial is written with the exclamation point first.  The subfactorial finds all the possible arrangements of a set of objects where none of the objects end up in their original position.


For example, when arranging the set {1, 2, 3, 4} the subfactorial counts sets such as {2, 1, 4, 3} and {3, 4, 1, 2} but not {1, 4, 3, 2}.  For the positive integers:   !n < n!.


I am going to present two programs.  The first will use the formula stated above.


The second uses this formula, which will not require recursion or loops:


!n = floor[ (e + 1/e) × n! ] - floor[ e × n! ]


Note: Since the N! function on the DM42 accepts only positive integers, we can use the IP (integer part) to simulate the floor function.


integer(x) = { floor(x) if x ≥ 0,  ceiling(x) if x < 0


The following programs can be used on Free42, HP 42S, or Swiss Micros DM42.


Swiss Micros DM42 Program:  Subfactorial Version 1


This is a traditional route.  Registers used:


R01:  k,  counter

R02:  sum register 

R03:  n!, later !n


Program labels can start with symbols on the 42S.


01  LBL "!N"

02  STO 01

03  N!

04  STO 03

05  0

06  STO 02

07  RCL 01

08  1E3

09  ÷

10  STO 01

11  LBL 00

12  RCL 01

13  IP

14  ENTER

15  ENTER

16  -1

17  X<>Y 

18  Y↑X

19  X<>Y

20  N!

21  ÷

22  STO+ 02

23  ISG 01

24  GTO 00

25  RCL 02

26  RCL× 03

27  STO 03

28  RTN


Swiss Micros DM42 Program:  Subfactorial Version 2


I only put 2 in the label to distinguish the two programs.  


01  LBL "!N 2"

02  N!

03  ENTER

04  ENTER

05  1

06  E↑X

07  ENTER

08  1/X

09  +

10  ×

11  IP

12  X<>Y

13  1

14  E↑X

15  ×

16  IP

17  -

18  RTN



Examples


!2 = 1

!3 = 2

!4 = 9

!5 = 44

!9 = 133,496

!14 ≈ 3.2071E10


Sources


"Calculus How To:  Subfactorial"   College Help Central, LLC .https://www.calculushowto.com/subfactorial/ Retrieved September 5, 2021. 



Weisstein, Eric W. "Subfactorial." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Subfactorial.html  Retrieved September 5, 2021


Numworks 16.3 Update

Numworks recently updated its firmware to Version 16.3.  Find details of the changes and additions here:

https://my.numworks.com/firmwares

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. 


Saturday, June 19, 2021

7000G Retro Month - June 19 Edition

7000G Retro Month - June 19 Edition





Introduction


Welcome to the 7000G Retro Month, which features programming for the classic Casio calculators from the mid/late 1980s:  primarily fx-7000G and fx-7500G.  Since the programming language stays similar throughout the years, programs can be translated to the fx-6300G and later graphing calculators with little to no adjustments.  Non graphic programs should be ported to the fx-4000P, fx-4500P (A), fx-3650p (II), fx-50F Plus (II), and fx-5800P with little to no adjustments.  


7000G Retro Month takes place every Saturday during June 2021.


To make text easier to type, I can going to use the following text friendly symbols for the following:


->  for →


/I for ⊿


=> for ⇒


What do you think?   Unicode or simple text equivalents?  


- - - - - - -- - -- - -


Today's subject revolves around Probability and Random Numbers.  Enjoy!


- - - -- - - -- - -- -- -


Random Integers: Repeats Allowed 


This program allows the user to generate a number of integers between A and B, repeats are allowed.   Each integer is displayed one at a time.


"A"? -> A

"B"? -> B

"N"? -> N

Lbl 1

Int ((B-A+1) Rnd#) /I

Dsz N

Goto 1


Combinatorics


The program allows the user to choose between three options:


1.  PERM:  permutation:  nPr

2.  COMB:  combination:  nCr

3.  COMB REPLACE:  combination with replacements allowed (n+r-1)Cr


"N"? -> N

"R"? -> R

"1. PERM"

"2. COMB"

"3. COMB REPLACE"

? -> K

K=1 => N!÷(N-R)! -> X

K=2 => N!÷(R!(N-R)!) -> X

K=3 => (N+R-1)!÷(R!(N-1)!) -> X

X


Binomial Distribution


This program calculates the sum of probabilities for a binomial distribution:


total probability = ∑( nCr(N,K) p^K (1-p)^(N-K), K=A to B)


Probability:  0 < p < 1


"A"? -> A : "B"? -> B

"N"? -> N : "P"? -> P

0 -> M : Lbl 1

M+(N!×P^A×(1-P)^(N-A))÷(A!(N-A)!) -> M

A+1 -> A

A>B => Goto 2

Goto 1

Lbl 2

M


Confidence Interval


This program generates a confidence interval using one of four probabilities are assigned to the following variables:


F: 99%  (z* ≈ 2.576)

G: 98% (z* ≈ 2.326)

H: 95% (z* ≈ 1.96)

I: 90% (z* ≈ 1.645)


interval = mean ± z* × variance / √n


"CONF INTERVAL"

2.576 -> F

2.326 -> G

1.96 -> H

1.645 -> I

"MEAN"? -> A

"VAR"? -> B

"N"? -> N

"F=.99, G=.98"

"H=.95, I=.90"

? -> J

A-JB÷√N -> E /I

A+JB÷√N -> F


E:  low, F: high


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. 


Saturday, September 5, 2020

Casio fx-9750GIII: Combination Matrices

 Casio fx-9750GIII:  Combination Matrices

Introduction

The program COMBMTRX creates an aligned combination triangle with rows 0 to W-1 and columns 0 to W-1.  The matrix is a square matrix with size W x W.  


1.  Pascal 

n NCR k


2.  Catalan 

(n - k + 1) / (n + 1) * [ n+k NCR n ]


3.  Borel

1 / (n + 1) * [ 2n+2 NCR n-k ] * [ n+k NCR n ]


4.  User Function

f(n, k,  h(n,k) NCR g(n,k))


"Blank" spaces will be filled with 0.  


Casio fx-9750GIII Program:  COMBMTRX

(320 bytes)


Note:  On the program screen, nCr will be symbolized as a bold C


"2020-08-11 EWS"

"COMBINATION MATRIX"

"SIZE"? → W

Identity W → Mat A

Menu "SELECT TYPE","PASCAL",1,"CATALAN",2,"BOREL",3,"USER",4

Lbl 1

"(N)nCr(K)" → fn1

Goto 5

Lbl 2

"(N-K+1)÷(N+1)×(N+K)nCr(N)" → fn1

Goto 5

Lbl 3

"1÷(N+1)×(2N+2)nCr(N-K)×(N+K)nCr(N)" → fn1

Goto 5

Lbl 4

"F(N,K)"? → fn1

Goto 5

Lbl 5

For 1 → I To W

For 1 → J To I

I-1 → N

J-1 → K

fn1 → Mat A[I,J]

Next

Next

Mat A


Examples


Size: 5


Option 1:  Pascal


[[ 1 0 0 0 0 ]

 [ 1 1 0 0 0 ]

 [ 1 2 1 0 0 ]

 [ 1 3 3 1 0 ]

 [ 1 4 6 4 1 ]]


Option 2:  Catalan


[[ 1 0 0 0 0 ]

 [ 1 1 0 0 0 ]

 [ 1 2 2 0 0 ]

 [ 1 3 5 5 0 ]

 [ 1 4 9 14 14 ]]


Option 3:  Borel


[[ 1 0 0 0 0 ]

 [ 2 1 0 0 0 ]

 [ 5 6 2 0 0 ]

 [ 14 28 20 5 0 ]

 [ 42 120 135 70 14 ]]


Option 4:  User

f = (N+K+1)nCr(K) ÷ (N=1)


(in fraction form)


[[ 1 0 0 0 0 ]

 [ 1/2 3/2 0 0 0 ]

 [ 1/3 4/3 10/3 0 0 ]

 [ 1/4 5/4 15/4 35/4 0 ]

 [ 1/5 6/5 21/5 56/5 126/5 ]]


 Source:


Cai, Yue and Yan, Catherine.  "Coutning with Borel's Triangle"  Elsevier B.V. Discrete Mathematics.   November 15, 2018  https://arxiv.org/pdf/1804.01597.pdf

Also:  https://doi.org/10.1016/j.disc.2018.10.031

Retrieved August 9, 2020

Eddie

All original content copyright, © 2011-2020.  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. 


Saturday, August 29, 2020

Radio Shack EC-4019: Catalan and Borel Triangles

 Radio Shack EC-4019:   Catalan and Borel Triangles 

Introduction:   Catalan and Borel Triangles 

Catalan numbers counts a number of lattice paths, straight lines with segment of length 1, in the Cartesian plane from the origin (0,0) to the point (n,k).  There path does not go above the line y = x.  

Entries in Borel's Triangle depend on the entries of Catalan's Triangle.  There are various interpretations of how counting relate to Borel's triangle, including counting the number of Dyck path of semi-length n+1, counting path in leaf-market binary trees, and set of binary trees with n+1 vertices with k marked vertices with no markings on the tree's right spine.  Please see the source below for more details.  


Formula Derivation

You can find any entry in Catalan's triangle by the formula:

C = (n - k + 1) / (n + 1) * COMB(n + k, n)

where:


1.  k ≤ n, I do believe that k and n need to be integers, and

2.  COMB is the nCr, combination function, where for any x and y:

COMB(x, y) = x! / ( y! * (x - y)! )

We can simplify the formula for Catalan's triangle by:

= (n - k + 1) / (n + 1) * COMB(n + k, n)

= (n - k + 1) / (n + 1) * (n + k)! / (n! * (n + k - n)!)

= (n - k + 1) / (n + 1) * (n + k)! / (n! * k!)

= (n - k + 1) / (n + 1) * (n + k)! /n! * 1/k!


Since (n + 1) * n! = (n + 1) * n * (n - 1) * (n - 2) * ... = (n + 1)!

= (n - k + 1) * (n + k)! / ((n + 1)! * (n - k)!)


Observe that

C / (n-k+1) = (n + k)! / ((n + 1)! * (n - k)!)


Similarly, you can find any entry in Borel's triangle by the formula:


= 1 / (n + 1) * COMB(2n + 2, n - k) * COMB(n + k, n)

= 1/ (n + 1) * (2n + 2)! / ((n - k)! * (n + 2 + k)!) * (n + k)!/(n! * k!)

= (2n + 2)! / ((n - k)! * (n + 2 + k)!) * (n + k)!/((n+1)! * k!)

= (2n + 2)! / ((n - k)! * (n + k + 2)!) * Ca


Radio Shack EC-4019 Programs:  Catalan and Borel Triangle Numbers


To run the program:

1.  Store k in memory register 1.  Keystrokes:  k [ Kin ]  [ 1 ]

2.  Store n in memory register 2.  Keystrokes:  n [ Kin ] [ 2 ]

3.  To find the Catalan Triangle, run program I.   

4.  To find the Borel triangle number, run program I, then immediately run program II.  Program II depends on the result of program I.  


Make sure that k ≤ n, as the programs assume that your inputs are valid.


Program I:  Catalan Triangle Number

(25 steps)

(small x:  multiply key,  slash: divide key)


[(---

Kout 2

-

Kout 1

+


---)]

[(---

Kout 2


+

Kout 1

---)]

x!

/


[(---

Kout 2

+

1

---)]


x!

/

Kout 1

x!

=


Program II: Borel Triangle Number

(28 steps)

(small x:  multiply key,  slash: divide key)


x

[(---

2

Kout 2


+

2

---)]

x!

/


[(

Kout 2

-

Kout 1

+


1

)]

x!

/

[(


Kout 1

+

Kout 2

+

2


---)]

x!

=


Examples

k = 2,  n = 6,  Catalan (I):  20,  Borel (II): 4004

k = 3, n = 5,  Catalan (I): 28, Borel (II): 616

k = 4, n = 4,  Catalan (I): 14, Borel (II): 14


Source:

Cai, Yue and Yan, Catherine.  "Coutning with Borel's Triangle"  Elsevier B.V. Discrete Mathematics.   November 15, 2018

https://arxiv.org/pdf/1804.01597.pdf

Also:  https://doi.org/10.1016/j.disc.2018.10.031

Retrieved August 9, 2020

Eddie

All original content copyright, © 2011-2020.  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. 


Wednesday, July 18, 2018

Fun with the FX-603P Emulator


Fun with the FX-603P Emulator





Author for the Emulator:  Martin Krischik



Cost: $5.99 (there is an fx-602P scientific calculator emulator for $4.99, similar programming language but only 10 programming spaces instead of 20)

The app is emulates the 1990 Casio fx-603P calculator.



Decibels to Pressure

Program: (29 steps)

“DB?”  HLT  ÷ 20  = 10^x  *  2E-5  = “Pressure:” HLT

Examples:

DB = 30 dB; Result:  6.32455532 * 10^-4 N/m^2

DB = 120 dB; Result:  20 N/m^2

Turn Performance

Given a plane’s true air speed (TAS in knots), stall speed (in knots), and required bank turn (in degrees), the following are calculated:

1. G force
2.  Normal stall speed for the plane during the turn (knots)
3.  Turn diameter (nautical miles)
4.  Time it takes for the turn to be complete (in minutes)

Formulas:

G = 1/(cos(bank))

Stall speed = normal stall speed * G

Diameter = TAS^2 / (34208 * tan(bank))

Time = (0.0055 * TAS) / tan(bank)

Memory Registers:

Input:

M00 = TAS, M01 = Stall speed, M02 = Bank

Output:

M03 = G force, M04 = resulting stall speed, M05 = diameter, M06 = time

Program: (110 steps)

DEG “TAS?” HLT Min00
 “Norm. Stall?” HLT  Min01
 “Bank?” HLT Min02
MR02 cos 1/x Min03 “G:” HLT
MR03 √ * MR01 = “Stall Speed:” HLT
MR00 x^2 ÷ ( MR02 tan * 34208 ) = Min05 “Diameter:” HLT
0.0055 * MR00 ÷ MR02 tan “Time:” HLT Min06

Notes: 
DEG:  [ MODE ] [ 4 ]


Example:

Inputs:
TAS: 123 knots
Norm. Stall:  60 knots
Bank:  44.8°

Results:
G:  1.409302674
Stall Speed: 71.22843498 knots
Diameter:  0.445363387 n.m.
Time: 0.681239424 minutes (about 40.87 seconds)

Source:  “Turn Performance” HP 65 Aviation Pac-1 Hewlett Packard.  1974
.

Sum of a Function

This program uses the subroutine (under P9 with the variable MinF, or any register M04 or after) to calculate the summation:

Σ f(x) for x = a to b

The sum is stored in M03.

Note: when entering a new f(x), clear P9 (MODE, 3, P9, AC) first before entering the new function.  It’s a lot cleaner.

Main Program:  (34 bytes)

0 Min03
“a?” HLT Min01
“b?” HLT Min02
MR02 – MR01 + 1 = Min00
Lbl0
MR01 GSBP9 M+03
1 M+01
DSZ Goto0
MR03 “Σ=”

Note: 
Lbl0:  [ LBL] [ 0 ]
GSBP9: [GSB] [ P9 ]
Goto0:  [ GOTO ] [ 0 ]
The character Σ:  (in ALPHA) [SHIFT] [ 7 ]
Memory F:  [ Min ], [ MR ], etc.  [EXE] for F.

Examples:

Σ n^2 + 3*n – 6 for n = 1 to 8 
Subroutine:
Min0F x^2 + 3 * MR0F – 6 =

Result:  264

Σ (n^3 – 1)/(n^2 + 1) for n = 0 to 11
Subroutine:
( Min0F x^y 3 – 1 ) /div (MR0F x^2 + 1 ) =

Result: 61.6582396282

Combinations: where Repetition is allowed

The program calculates the number of combinations where repeats are allowed.

nHr = (n + r – 1)! / (r! * (n -1)!)

Program:  (39 steps)

“n?” HLT Min01
“r?” HLT Min02
( MR01 + MR02 – 1) x!
÷ ( MR02 x! * ( MR01 – 1 ) x! )
= “nHr=”

Examples:

Input: n = 5, r = 3.  Result:  35

Input: n = 12, r = 6.  Result:  12376

Aviation:  Rate of Climb

This program calculates the rate-of-climb (ft/min) when plane increases the elevation (in feet) given the distance to the mountain (in nautical miles, n.m.) and the true air speed (TAS, in knots). 

Formula:

ROC = ( TAS * ΔALT  ) / (60 * (dist^2 + (ΔALT/6077.1155)^2) )

Program: (88 steps)

6077.1155 Min0F
“TAS (knots)?” HLT Min01
“CHG ALT (ft)?” HLT Min02
“DIST (n.m.)?” HLT Min03
( MR01 * MR02 ) ÷
( 60 * ( MR03 x^2 + (
MR02 ÷ MR0F ) x^2
)   √ = “ROC:”

Example:

Input:
TAS = 87 knots
CHG ALT = 4800 ft
DIST = 13.3 n.m.

Result:
522.3878955 ft/min

Source:  “Rate of Climb and Descent” HP 65 Aviation Pac-1 Hewlett Packard.  1974

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.

Monday, April 16, 2018

Combinatorics Derivations


Combinatorics Derivations



The definition of the combination function is:



C(n, r) = n! / (r! *  (n – r)!)



Today I am going to mathematically verify three equivalents in combinatorics.



Newton’s Identity



C(n,r) * C(r,k) = C(n,k) * C(n – k, r – k)



Here I am going to assume that n > r > k.



Hence:



C(n, r) * C(r, k)

= n! / (r! * (n – r)!) * r! / (k! * (r – k)!)

= n! / (n – r)! * 1 /  (k! * (r – k)!)



Rearrange:



= n! / k! * 1 / ((n – r)! * (r – k)!)



Multiply by (n – k)!/(n- k)!:



= n! / (k! * (n – k)!) * (n – k)! / ((n – r)! * (r – k)!)



Observe that (n – k) – (r – k) = n – k – r + k = n – r.  Hence,



= C(n,k) * C(n – k, r – k)   QED



Pascal’s Identity



C(n,r) = C(n-1, r) + C(n – 1, r – 1)



I’m going to start with C(n-1, r) + C(n – 1, r – 1)



C(n-1, r) + C(n – 1, r – 1)



= (n – 1)! / (r! * (n – 1 – r)!) + (n – 1)! / ((r – 1)! * (n – r)!)



= (n – 1)! / (r! * (n – 1- r)!) + (r * (n – 1)!) / (r! *(n – r)!)



= ((n – 1)! * (n – r)) / (r! * (n – r)!) + (r * (n – 1)!) / (r! * (n – r)!)



= (n * (n – 1)! – r * (n – 1)! + r * (n – 1)!) / (r! * (n – r)!))



= (n * (n  - 1)!) / (r! * (n – r)!)



= n! / (r! * (n – r)!)



= C(n, r)  QED



Combinatorial Proof



C(m + n, 2) – C(m, 2) – C(n, 2) = m * n



C(m + n, 2) – C(m, 2) – C(n, 2)



Note that 2! = 2



= (m + n)! / (2 * (m + n – 2)!) – m! / (2 * (m – 2)!) – n! / (2 * (n – 2)!)



= ( (m + n)! * (m – 2)! * (n – 2)! – m! * (m + n – 2)! * (n – 2)!  - n! * (m – 2)! * (m + n – 2)!) / (2 * (m + n – 2)! * (m – 2)! * (n – 2)!)



= ( (m + n) * (m + n – 1) *(m + n – 2)! * (m – 2)! * (n – 2)! – m * (m – 1) *(m – 2)! * (n – 2)! * (m + n – 2)! – n * (n – 1) * (n – 2)! * (m – 2)! * (m + n – 2)! )

/  (2 * (m + n – 2)! * (m – 2)! * (n – 2)!)



= ( (m + n)*(m + n – 1) – m * (m – 1) – n * (n – 1) ) / 2



= ( m^2 + m*n – m + m*n + n^2 – n – m^2 + m – n^2 + n) / 2



= (2 * m * n) / 2



= m * n   QED



Eddie



Source where I got the identities from:

V.K. Balakrishnan Schaum’s Theory and Problems: Combinatorics including concepts of Graph Theory  McGraw-Hill, Inc. New York: 1995  ISBN 0-07-003575-X



The derivation and proof details are my work.  



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.

Monday, January 25, 2016

Sunday, January 10, 2016

HP 15C: Row of Pascal’s Triangle

HP 15C:  Row of Pascal’s Triangle




Input:  The row n.

Registers Used: 

R0 = counter
R1 = n

Program:

Step
Key
Key Code
001
LBL A
42, 21, 11
002
STO 1
44, 1
003
3
3
004
10^X
13
005
÷
10
006
STO 0
44, 0
007
LBL 1
42, 21, 1
008
RCL 1
45, 1
009
RCL 0
45, 0
010
INT
43, 44
011
Cy,x (COMB)
43, 40
012
R/S
31
013
ISG 0
42, 6, 0
014
GTO 1
22, 1
015
RTN
43, 32


Examples:

Row 4 (n = 4): 1, 4, 6, 4, 1
Row 8 (n = 8): 1, 8, 28, 56, 70, 56, 28, 8, 1


This blog is property of Edward Shore. 2016



Python – Earth’s Radius and Gravity in US Units

Python – Earth’s Radius and Gravity in US Units Introduction The following script, gravus2.py, estimates the Earth’s gravity i...