-
Notifications
You must be signed in to change notification settings - Fork 0
Numbers
Source: HP-45 Applications Book (HP 00045-90320 Rev. B Reorder 00045-66001, Dec 1974)
Formula:
In a Fibonacci sequence, each term is the sum of the two preceding terms.
fi represents the ith term in the sequence.
Example:
Develop the Fibonacci sequence with f1 = 1, f2 = 1.
Answer:
1, 1, 2, 3, 5, 8, 13, 21, …
LINE | DATA | OPERATIONS | DISPLAY | REMARKS |
---|---|---|---|---|
1 | f1 | ENTER |
||
2 | f2 | |||
3 |
ENTER ENTER R↓ R↓ +
|
fi | Perform 3 for i=3,4,… |
; XEQ F ENTER
LBL F
CLx
ENTER
!
@005: PSE
eqn 'REGX+REGY'
GTO @005
Source: Morten Nygaard Åsnes (208623)
Formula:
Example:
Find the 12th Fibonacci number in the sequence 1, 1, 2, 3, 5, 8 …
Answer:
144
LINE | DATA | OPERATIONS | DISPLAY | REMARKS |
---|---|---|---|---|
1 | n |
ENTER 5 √x ![]() STO
|
||
2 |
A ENTER 1 + 2
|
|||
3 |
÷ x<>y y˟ RCL A
|
|||
4 |
÷ ![]() DISPLAY 1'FIX 0
|
Formula:
The Harmonic numbers Hi (i = 1, 2, …) are
or
Example:
Display the sequence in decimal form.
Answer:
1.00, 1.50, 1.83, 2.08, …
LINE | DATA | OPERATIONS | DISPLAY | REMARKS |
---|---|---|---|---|
1 |
![]() ENTER ![]() STO H
|
|||
2 | ![]() |
Perform 2-4 for i=1,2,… | ||
3 |
1 + ENTER 1/x RCL
|
|||
4 |
H + ![]() STO H
|
Hi |
Formula:
Example:
Find the 7th Harmonic number.
Answer:
2.59
Note:
E = 0.5772156649 is Euler's constant (usually denoted by the lowercase Greek letter γ).
LINE | DATA | OPERATIONS | DISPLAY | REMARKS |
---|---|---|---|---|
1 |
![]() STO A 1/x ENTER
|
|||
2 |
ENTER ENTER 1 2 0
|
|||
3 |
1/x × × 1 2
|
|||
4 |
1/x - × 2 1/x
|
|||
5 |
+ ×
|
|||
6 | E |
+ RCL A ![]() ln
|
||
7 | + |
The Bernoulli numbers Bl, B2, B3 … are defined by
specifically
1⁄6, 1⁄30, 1⁄42, 1⁄30, 5⁄66, 691⁄2730, 7⁄6, …
Example:
The 16th Bernoulli number = 7.09 (i takes the values 1, 2).
LINE | DATA | OPERATIONS | DISPLAY | REMARKS |
---|---|---|---|---|
1 | n |
ENTER 2 × ENTER ENTER
|
||
2 |
ENTER ENTER
|
|||
3 |
![]() STO B ![]() |
Perform 3-6 for i=1,2,… | ||
4 | i |
ENTER 2 × 1 +
|
until change Ai does not change | |
5 |
x<>y y˟ 1/x RCL B
|
|||
6 | + |
Ai | ||
7 |
R↓ ![]() ! 2 ×
|
|||
8 |
RCL B × R↓ R↓
|
|||
9 |
2 x<>y y˟ 1 -
|
|||
10 |
x<>y ![]() π x<>y y˟
|
|||
11 |
× ÷
|
; XEQ B ENTER
LBL B
STO C
1
x>y?
RTN
STO X
RCL+ X
x<=y?
GTO @12
1/x
+/-
RTN
@12:
x!=y?
GTO @18
6
1/x
RTN
@18:
RMDR
0
x!=y?
RTN
4
RCL C
x!=y?
GTO @31
30
1/x
+/-
RTN
@31:
6
x!=y?
GTO @38
42
1/x
RTN
@38:
x<>y
FIX 9
XEQ ZETA
STO X
RCL+ X
1
+/-
RCL C
2
/
y^x
*
+/-
pi
STO X
RCL+ X
1e-9
-
RCL C
y^x
/
@58:
RCL C
*
DSE C
GTO @58
RTN
ZETA:
+/-
STO B
1
STO A
ENTER
@07:
CLx
! ; REGX = 1
RCL A
+
STO A
RCL B
y^x
-
+/-
LASTx
RND ; the accuracy is determined by the display format.
x!=0?
GTO @07
! ; REGX = 1
2
RCL B
y^x
STO X
RCL+ X
-
/
ABS
RTN
Source: Jean-Marc Baillard (41bernu)
Compute the nth Euler number
Note:
The Euler numbers are 1, 5, 61, 1385, 50521, …
Formula:
The Euler numbers E1, E2, E3, … are defined by
Example:
The 5th Euler number = 50521.
LINE | DATA | OPERATIONS | DISPLAY | REMARKS |
---|---|---|---|---|
1 | n |
ENTER 2 × ENTER ENTER
|
||
2 |
ENTER ![]() ! x<>y 2
|
|||
3 |
+ 2 x<>y y˟ ×
|
|||
4 |
x<>y 1 ÷ ![]() π
|
|||
5 |
x<>y y˟ ÷ ![]() DISPLAY
|
|||
6 |
1'FIX 0
|
- HP-35s Startpage
- Assembler
- Emulator
- Applications Book (en|de)
- Introduction
- Machine Related Operations
- Number Theory and Algebra
- Geometry and Trigonometry
- Miscellany
- Appendix