OFFSET
0,3
REFERENCES
E. S. R. Gopal, Specific Heats at Low Temperatures, Plenum Press, New York, 1966, pages 36-40.
LINKS
Robert Israel, Table of n, a(n) for n = 0..804
FORMULA
a(n) = 2*a(n-1) - (n-1)*a(n-2) for n odd > 1; a(n) = 2*(a(n-1) - (n-2)*a(n-2)) for n even > 1.
MAPLE
f:= proc(n) option remember;
if n::odd then 2*procname(n-1) - (n-1)*procname(n-2)
else 2*procname(n-1) - 2*(n-2)*procname(n-2)
fi
end proc:
f(0):= 0: f(1):= 1:
map(f, [$0..100]); # Robert Israel, Mar 15 2017
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := a[n] = If[Mod[n, 2] == 1, 2*a[n - 1] - ( n - 1)*a[n - 2], 2*(a[n - 1] - (n - 2)*a[n - 2])] b = Table[a[n], {n, 0, 30}]
nxt[{n_, a_, b_}]:={n+1, b, If[EvenQ[n], 2*b-n*a, 2(b-(n-1)a)]}; Transpose[ NestList[ nxt, {1, 0, 1}, 30]][[2]] (* Harvey P. Dale, Dec 15 2014 *)
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Roger L. Bagula, Sep 19 2006
EXTENSIONS
Edited by N. J. A. Sloane, Oct 01 2006
STATUS
approved