|
|
A141036
|
|
Tribonacci-like sequence; a(0)=2, a(1)=1, a(2)=1, a(n) = a(n-1) + a(n-2) + a(n-3).
|
|
14
|
|
|
2, 1, 1, 4, 6, 11, 21, 38, 70, 129, 237, 436, 802, 1475, 2713, 4990, 9178, 16881, 31049, 57108, 105038, 193195, 355341, 653574, 1202110, 2211025, 4066709, 7479844, 13757578, 25304131, 46541553, 85603262, 157448946, 289593761
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
I used the short MATLAB program from the zip file link altered to produce a Lucas version of the tribonacci numbers.
|
|
REFERENCES
|
Martin Gardner, Mathematical Circus, Random House, New York, 1981, p. 165.
|
|
LINKS
|
|
|
FORMULA
|
a(0)=2; a(1)=1; a(2)=1; a(n) = a(n-1) + a(n-2) + a(n-3).
O.g.f.: (2-x-2*x^2)/(1-x-x^2-x^3). (End)
|
|
MATHEMATICA
|
a[0]=2; a[1]=1; a[2]=1; a[n_]:= a[n]=a[n-1]+a[n-2]+a[n-3]; Table[a[n], {n, 0, 40}] (* Alonso del Arte, Mar 24 2011 *)
|
|
PROG
|
(Haskell)
a141036 n = a141036_list !! n
a141036_list = 2 : 1 : 1 : zipWith3 (((+) .) . (+))
a141036_list (tail a141036_list) (drop 2 a141036_list)
(PARI) my(x='x+O('x^40)); Vec((2-x-2*x^2)/(1-x-x^2-x^3)) \\ G. C. Greubel, Apr 22 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (2-x-2*x^2)/(1-x-x^2-x^3) )); // G. C. Greubel, Apr 22 2019
(Sage) ((2-x-2*x^2)/(1-x-x^2-x^3)).series(x, 41).coefficients(x, sparse=False) # G. C. Greubel, Apr 22 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
Matt Wynne (matwyn(AT)verizon.net), Jul 30 2008
|
|
EXTENSIONS
|
Corrected offset and indices in formulas, R. J. Mathar, Aug 05 2008
|
|
STATUS
|
approved
|
|
|
|