OFFSET
0,2
COMMENTS
Let T(n,k) denote the k-th element of row n of Stern's triangle (see A337277). Then b(n) = Sum_k T(n,k)*T(n,k+1) gives the present sequence (without the signs). - N. J. A. Sloane, Nov 19 2020
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Richard P. Stanley, Some Linear Recurrences Motivated by Stern's Diatomic Array, arXiv:1901.04647 [math.CO], 2019. Also American Mathematical Monthly 127.2 (2020): 99-111.
Index entries for linear recurrences with constant coefficients, signature (5,-2).
FORMULA
a(n) = -2*A107839(n-1), n>0.
a(n) = first entry of v(n), where v(n) = M*v(n-1), M is the 2 X 2 matrix ({0, -2}, {1, 5}) and v(0) is the column vector (0, 1).
G.f.: -2*x/(1-5*x+2*x^2). - Alois P. Heinz, Nov 26 2020
a(n) = -sqrt(2)^(n+1)*ChebyshevU(n-1, 5/(2*sqrt(2))). - G. C. Greubel, Sep 10 2021
MAPLE
a:= n-> (<<0|-2>, <1|5>>^n)[1, 2]:
seq(a(n), n=0..25); # Alois P. Heinz, Nov 19 2020
MATHEMATICA
LinearRecurrence[{5, -2}, {0, -2}, 41] (* G. C. Greubel, Sep 10 2021 *)
PROG
(Magma) I:=[0, -2]; [n le 2 select I[n] else 5*Self(n-1) - 2*Self(n-2): n in [1..41]]; // G. C. Greubel, Sep 10 2021
(Sage) [-round(sqrt(2)^(n+1)*chebyshev_U(n-1, 5/(2*sqrt(2)))) for n in (0..40)] # G. C. Greubel, Sep 10 2021
CROSSREFS
KEYWORD
sign,easy,less
AUTHOR
Roger L. Bagula, May 30 2005
EXTENSIONS
Edited by N. J. A. Sloane, Apr 30 2006
New name by G. C. Greubel, Sep 10 2021
STATUS
approved