OFFSET
1,2
COMMENTS
The sequence and higher-order differences in subsequent rows are
1, 3, 11, 23, 51, 103, 211, 423, 851, 1703, 3411, 6823, 13651
2, 8, 12, 28, 52, 108, 212, 428, 852, 1708, 3412, 6828, 13652
6, 4, 16, 24, 56, 104, 216, 424, 856, 1704, 3416, 6824, 13656
-2, 12, 8, 32, 48, 112, 208, 432, 848, 1712, 3408, 6832, 13648
14, -4, 24, 16, 64, 96, 224, 416, 864, 1696, 3424, 6816, 13664
-18, 28, -8, 48, 32, 128, 192, 448, 832, 1728, 3392, 6848, 1363
46, -36, 56, -16, 96, 64, 256, 384, 896, 1664, 3456, 6784, 1369
The main diagonal 1,8,16,... is essentially A000079.
A subdiagonal is 2, 4, 8, 16, ... A155559.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,1,-2).
FORMULA
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).
a(n+1) - 2*a(n) = A010686(n-1).
a(n) = A084214(n+1) - 3.
G.f.: x*(1 + x + 4*x^2) / ( (1-x)*(1-2*x)*(1+x) ).
a(2n+3) - a(2n+1) = 10*A000302(n).
E.g.f.: (-2*exp(-x) + 6 - 9*exp(x) + 5*exp(2*x))/3. - G. C. Greubel, Dec 01 2019
MAPLE
seq( (5*2^n -2*(-1)^n -9)/3, n=1..40); # G. C. Greubel, Dec 01 2019
MATHEMATICA
LinearRecurrence[{2, 1, -2}, {1, 3, 11}, 40] (* Harvey P. Dale, Oct 01 2018 *)
PROG
(Magma) [5*2^n/3-2*(-1)^n/3-3: n in [1..40]]; // Vincenzo Librandi, Aug 05 2011
(PARI) vector(40, n, (5*2^n - 2*(-1)^n - 9)/3) \\ G. C. Greubel, Dec 01 2019
(Sage) [(5*2^n - 2*(-1)^n - 9)/3 for n in (1..40)] # G. C. Greubel, Dec 01 2019
(GAP) List([1..40], n-> (5*2^n - 2*(-1)^n - 9)/3); # G. C. Greubel, Dec 01 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Feb 09 2010
STATUS
approved