OFFSET
0,3
REFERENCES
L. Rosenfeld, Nuclear Forces, section II, Interscience, New York, 1948, p 202
LINKS
Index entries for linear recurrences with constant coefficients, signature (4, 1, -4).
FORMULA
G.f.: x*(1+x^2) / ( (x-1)*(4*x-1)*(1+x) ). - R. J. Mathar, Nov 07 2015
a(n) = 3*a(n-1)+4*a(n-2)+2,n>=3. - R. J. Mathar, Nov 07 2015
MAPLE
a:=proc(n) if n=0 then 0 elif n=1 then 1 elif n mod 2 = 1 then 4*a(n-1)+2 else 4*a(n-1) fi end: seq(a(n), n=0..24);
MATHEMATICA
b[0] := 0 b[1] := 1 b[n_?EvenQ] := b[n] = 4*b[n - 1] b[n_?OddQ] := b[n] = 4*b[n - 1] + 2 a = Table[b[n], {n, 0, 25}]
nxt[{n_, a_}]:={n+1, If[EvenQ[n], 4a+2, 4a]}; Join[{0}, Transpose[NestList[nxt, {1, 1}, 30]][[2]]] (* or *) Join[{0}, LinearRecurrence[{4, 1, -4}, {1, 4, 18}, 30]] (* Harvey P. Dale, Nov 28 2013 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Apr 07 2006
EXTENSIONS
Edited by N. J. A. Sloane, Apr 16 2006
STATUS
approved