HP Forums

Full Version: (38G) Tribonacci Sequence
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The programme below inserts symbolics in the Sequence aplet to produce the Tribonacci sequence.

For info on the sequence see:

https://oeis.org/A000073

Code:

RECURSE(U,U2(N-2),0,0)►U1(N):
CHECK 1:
RECURSE(U,U2(N-1)+U1(N)+U1(N-1),1,1)►U2(N):
If you want the sequence quick & dirty this programme

Code:

RECURSE(U,ROUND(3*1.83928675521^(N-1)/16.4110613799,0),0,0)►U1(N):
CHECK 1:

starts to err at N = 41.
Reference URL's