12-14-2017, 12:21 PM
The Tribonacci Sequence is a generalization of the Fibonacci sequence where each term is the sum of the three preceding terms.
The sequence begins 0, 1, 1, 2, 4, 7, 13, 24, 44, 81, 149,. . . .
Input the Nth number
Example: 7 A result 24
_______10 A result 149
Gamo
The sequence begins 0, 1, 1, 2, 4, 7, 13, 24, 44, 81, 149,. . . .
Input the Nth number
Example: 7 A result 24
_______10 A result 149
Code:
LBL A
STO 0
19
ENTER
33
√
3
x
-
3
1/X
Y^X
STO 1
33
√
3
x
19
+
3
1/X
Y^X
STO 2
+
1
+
3
1/X
x
RCL 0
Y^X
STO 3
RCL 1
RCL 2
+
1
+
4
ENTER
3
/
x
RCL 1
RCL 2
+
1
+
X^2
9
1/X
x
-
1
-
STO 4
RCL 3
RCL 4
/
FIX 0
RTN
Gamo