OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Kenneth Edwards and Michael A. Allen, New combinatorial interpretations of the Fibonacci numbers squared, golden rectangle numbers, and Jacobsthal numbers using two types of tile, J. Int. Seq. 24 (2021) Article 21.3.8.
Index entries for linear recurrences with constant coefficients, signature (3,-1,-3,2).
FORMULA
From Paul Barry, Jul 29 2004: (Start)
a(n) = Sum_{k=0..n+2} floor((n-k+2)/2) * 2^k;
a(n) = Sum_{k=0..n+2} floor(k/2) * 2^(n-k+2). (End)
a(n) = Sum_{k=0..floor((n+2)/2)} binomial(n-k+2, k+2)*2^k. - Paul Barry, Oct 25 2004
a(n) = floor((2^(n+4) - 3*n - 6)/6). - David W. Wilson, Feb 26 2006
a(n) = (2^(n+5) - 6*n - 21 + (-1)^n)/12. - Hieronymus Fischer, Dec 02 2006
Row sums of triangle A135086. - Gary W. Adamson, Nov 18 2007
a(n) = 3*a(n-1) - a(n-2) - 3*a(n-3) + 2*a(n-4). - Paul Curtz, Jul 29 2008
G.f.: Q(0)/(3*x*(1-x)^2), where Q(k) = 1 - 1/(4^k - 2*x*16^k/(2*x*4^k - 1/(1 + 1/(2*4^k - 8*x*16^k/(4*x*4^k + 1/Q(k+1)))))); (continued fraction). - Sergei N. Gladkovskii, May 21 2013
From Michael A. Allen, Jan 11 2022: (Start)
a(n) = J(n+3) - ceiling((n+3)/2), where Jacobsthal number J(n) = A001045(n).
a(n) = Sum_{j=1..n+1} j*J(n+2-j). (End)
MATHEMATICA
Table[(2^(n+5) -6*n-21+(-1)^n)/12, {n, 0, 30}] (* Vladimir Joseph Stephan Orlovsky, Jan 29 2011, modified by G. C. Greubel, Jun 02 2019 *)
CoefficientList[Series[1/((1-x)(1-2x)(1-x^2)), {x, 0, 30}], x] (* or *) LinearRecurrence[{3, -1, -3, 2}, {1, 3, 8, 18}, 30] (* Harvey P. Dale, Apr 17 2017 *)
PROG
(Magma) [Floor((2^(n+4)-3*n-6)/6): n in [0..30]]; // Vincenzo Librandi, Aug 14 2011
(PARI) my(x='x+O('x^30)); Vec(1/((1-x)*(1-2*x)*(1-x^2))) \\ G. C. Greubel, Sep 26 2017
(Sage) [(2^(n+5) -6*n-21+(-1)^n)/12 for n in (0..30)] # G. C. Greubel, Jun 02 2019
(GAP) List([0..30], n-> (2^(n+5) -6*n -21 +(-1)^n)/12) # G. C. Greubel, Jun 02 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved