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 (1,3,-3).
FORMULA
a(n) = 4*3^((n-1)/2)-2 (n odd), 2*3^(n/2)-2 (n even).
G.f.: 2*x*(x+1) / ((x-1)*(3*x^2-1)). - Colin Barker, Feb 15 2013
MATHEMATICA
Table[If[OddQ[n], 4*3^((n - 1)/2) - 2, 2*3^(n/2) - 2], {n, 25}] (* or *) LinearRecurrence[{1, 3, -3}, {2, 4, 10}, 25] (* G. C. Greubel, Oct 27 2016 *)
PROG
(PARI) apply( {A117862(n)=3^(n\2)<<(1+n%2)-2}, [0..44]) \\ M. F. Hasler, Jul 28 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Martin Renner, May 02 2006
EXTENSIONS
More terms from Colin Barker, Feb 15 2013
Extended to offset 0 by M. F. Hasler, Jul 28 2021
STATUS
approved