OFFSET
0,2
LINKS
Robert Israel, Table of n, a(n) for n = 0..632
Arieh Iserles, Expansions that grow on trees", Notices Amer. Math. Soc., 44 (No. 4, 2002), 430-439. See p. 433.
FORMULA
a(n) = 1 if n == 2 (mod 3), a(n+3) = (n+2)*(n+3)*a(n) otherwise. # Robert Israel, Jul 15 2019
EXAMPLE
The solution is 1 + (1/2)*t - (1/6)*t^3 - (1/24)*t^4 + (1/180)*t^6 + (1/1008)*t^7 - (1/12960)*t^9 - (1/90720)*t^10 + (1/1710720)*t^12 + ...
MAPLE
with(powseries); with(gfun);
e1:= diff(y(t), t$2)+t*y(t)=0; iv := y(0)=1, D(y)(0)=1/2;
soln := powsolve( ( e1, iv) ); t1:= tpsform( soln, t, 45 );
t2:=seriestolist(t1); t3:=map(denom, t2);
# Alternative:
f:= proc(n) option remember;
if n mod 3 = 2 then return 1 fi;
n*(n-1)*procname(n-3)
end proc:
f(0):= 1: f(1):= 2:
map(f, [$0..50]); # Robert Israel, Jul 15 2019
MATHEMATICA
f[n_] := f[n] = Switch[n, 0, 1, 1, 2, _, If[Mod[n, 3]==2, 1, n(n-1)f[n-3]]];
Table[f[n], {n, 0, 50}] (* Jean-François Alcover, Aug 27 2022, after Robert Israel *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Sep 05 2018
STATUS
approved