(11C) Tribonacci Sequence
12-14-2017, 12:21 PM (This post was last modified: 12-14-2017 12:33 PM by Gamo.)
Post: #1
 Gamo Senior Member Posts: 513 Joined: Dec 2016
(11C) Tribonacci Sequence
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

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
 « Next Oldest | Next Newest »

 Messages In This Thread (11C) Tribonacci Sequence - Gamo - 12-14-2017 12:21 PM RE: (11C) Tribonacci Sequence - Dieter - 12-14-2017, 09:34 PM RE: (11C) Tribonacci Sequence - StephenG1CMZ - 12-15-2017, 12:03 AM RE: (11C) Tribonacci Sequence - Gamo - 12-15-2017, 03:23 AM

User(s) browsing this thread: 1 Guest(s)