OFFSET
1,2
COMMENTS
a(n) is the sum of the numbers in row n+1 of the array defined in A025564 (and of the array in A024996).
a(n) is the number of (s(0), s(1), ..., s(n)) such that every s(i) is an integer, s(0) = 0, |s(i) - s(i-1)| = 1 for i = 1,2; |s(i) - s(i-1)| <= 1 for i >= 3.
Equals binomial transform of A095342: (1, 1, 5, 5, 17, 25, 61, ...). - Gary W. Adamson, Mar 04 2010
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3).
FORMULA
a(n) = A003946(n-2), n>2. - R. J. Mathar, May 28 2008
From Colin Barker, Oct 29 2019: (Start)
G.f.: x*(1 + x)*(1 - 2*x) / (1 - 3*x).
a(n) = 3*a(n-1) for n>3. (End)
MAPLE
seq( `if`(n<3, n, 4*3^(n-3)), n=1..30); # G. C. Greubel, Dec 26 2019
MATHEMATICA
Join[{1, 2}, 4*3^Range[0, 30]] (* or *) Join[{1, 2}, NestList[3#&, 4, 30]] (* Harvey P. Dale, Jun 27 2011 *)
PROG
(PARI) a(n)=max(n, 4*3^(n-3)) \\ Charles R Greathouse IV, Jun 28 2011
(PARI) Vec(x*(1+x)*(1-2*x)/(1-3*x) + O(x^30)) \\ Colin Barker, Oct 29 2019
(Magma) [1, 2] cat [4*3^(n-3): n in [3..30]]; // G. C. Greubel, Dec 26 2019
(Sage) [1, 2]+[4*3^(n-3) for n in (3..30)] # G. C. Greubel, Dec 26 2019
(GAP) Concatenation([1, 2], List([3..30], n-> 4*3^(n-3) )); # G. C. Greubel, Dec 26 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Definition corrected by R. J. Mathar, May 28 2008
STATUS
approved