OFFSET
0,10
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..200
FORMULA
a(n) = (3*a(n-1)*a(n-8) - a(n-4)*a(n-5))/a(n-9).
MAPLE
a:= proc (n) option remember;
if n < 9 then 1
else (3*a(n-1)*a(n-8) - a(n-4)*a(n-5))/a(n-9)
fi;
end proc;
seq(a(n), n=0..35); # G. C. Greubel, Oct 03 2019
MATHEMATICA
a[n_]:= a[n]= If[n<9, 1, (3*a[n-1]*a[n-8] -a[n-4]*a[n-5])/a[n-9]];
Table[a[n], {n, 0, 30}] (* modified by G. C. Greubel, Oct 03 2019 *)
nxt[{a_, b_, c_, d_, e_, f_, g_, h_, i_}]:={b, c, d, e, f, g, h, i, (3i*b-f*e)/a}; NestList[nxt, PadRight[{}, 9, 1], 30][[;; , 1]] (* Harvey P. Dale, Jun 05 2024 *)
PROG
(PARI) m=35; v=concat([1, 1, 1, 1, 1, 1, 1, 1, 1], vector(m-9)); for(n=10, m, v[n] = (3*v[n-1]*v[n-8] - v[n-4]*v[n-5])/v[n-9] ); v \\ G. C. Greubel, Oct 03 2019
(Magma) [n le 10 select 1 else (3*Self(n-1)*Self(n-8) - Self(n-4)*Self(n-5))/Self(n-9): n in [1..35]]; // G. C. Greubel, Oct 03 2019
(Sage)
def a(n):
if n<10: return 1
else: return (3*a(n-1)*a(n-8) - a(n-4)*a(n-5))/a(n-9)
[a(n) for n in (0..35)] # G. C. Greubel, Oct 03 2019
(GAP)
a:= function(n)
if n<10 then return 1;
else return (3*a(n-1)*a(n-8) - a(n-4)*a(n-5))/a(n-9);
fi;
end;
List([0..35], n-> a(n) ); # G. C. Greubel, Oct 03 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Sep 13 2006
EXTENSIONS
Name edited and offset changed by G. C. Greubel, Oct 03 2019
STATUS
approved