OFFSET
0,2
COMMENTS
From Paul Curtz, Jun 15 2011: (Start)
A square array of a(n) and its higher order differences is defined by T(0,k) = a(k) and T(n,k) = T(n-1,k+1)-T(n-1,k):
1, 3, 5, 8, 15, 31,
2, 2, 3, 7, 16, 33,
0, 1, 4, 9, 17, 32, see A130785(n).
1, 3, 5, 8, 15, 31,
2, 2, 3, 7, 16, 33,
a(n) is identical to its third differences: T(n+3,k) = T(n,k).
The main diagonal is T(n,n) = 2^n. Subdiagonals are T(n,n-1) = A014551(n) and T(n,n-2) = A062510(n).
(End)
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,2).
FORMULA
From Paul Curtz, Jun 15 2011: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3).
a(n) = 2^n - A128834(n).
a(n) - 2a(n-1)= A057079(n+1).
a(n) + a(n+3) = 9*2^n.
a(n+6) - a(n) = 63*2^n.
G.f.: (x-1)*(1+x) / ( (2*x-1)*(x^2-x+1) ). - R. J. Mathar, Jun 22 2011
a(n) = 2^n + (2*sin((Pi*n)/3))/sqrt(3). - Colin Barker, Feb 10 2017
EXAMPLE
a(4) = 8 = (1, 2, 0, 1) dot (1, 3, 3, 1) = (1 + 6 + 0 + 1).
MATHEMATICA
LinearRecurrence[{3, -3, 2}, {1, 3, 5}, 40] (* Harvey P. Dale, May 29 2012 *)
PROG
(PARI) x='x+O('x^30); Vec((x-1)*(1+x)/((2*x-1)*(x^2-x+1))) \\ G. C. Greubel, Jan 15 2018
(Magma) I:=[1, 3, 5]; [n le 3 select I[n] else 3*Self(n-1) - 3*Self(n-2) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Jan 15 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Jul 03 2008
STATUS
approved