OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4, -5, 2).
FORMULA
Binomial transform of [1, 2, 2, 3, 2, 3, 2, 3, 2, ...].
a(n) = 5*2^(n-1) - (n+1), for n >= 1.
Row sums of triangle A133938. - Gary W. Adamson, Sep 29 2007
G.f.: 1 + x*(3-5*x+3*x^2)/((1-2*x)*(1-x)^2). - R. J. Mathar, Nov 14 2007
E.g.f.: (5*exp(2*x) - 2*(1+x)*exp(x) - 1)/2. - G. C. Greubel, Oct 21 2017
EXAMPLE
a(3) = (1, 3, 3, 1) dot (1, 2, 2, 3) = (1 + 6 + 6 + 3).
a(5) = 74 = 2^6 + 2^4 - 6 = 64 + 16 - 6.
MATHEMATICA
Join[{1}, Table[5*2^(n-1) - n -1, {n, 1, 50)]] (* G. C. Greubel, Oct 21 2017 *)
LinearRecurrence[{4, -5, 2}, {1, 3, 7, 16}, 40] (* Harvey P. Dale, Jun 18 2024 *)
PROG
(PARI) concat(1, for(n=1, 50, print1(5*2^(n - 1) - n - 1, ", "))) \\ G. C. Greubel, Oct 21 2017
(Magma) [1] cat [5*2^(n - 1) - n -1: n in [1..50]]; // G. C. Greubel, Oct 21 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Sep 19 2007
EXTENSIONS
Terms a(9) onward added by G. C. Greubel, Oct 21 2017
STATUS
approved