login
A122055
A Somos 9-type recurrence: a(n) = (3*a(n-1)*a(n-8) - a(n-4)*a(n-5))/a(n-9), with a(0)=...=a(8)=1.
1
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 14, 41, 121, 353, 989, 2393, 9397, 49121, 342793, 2842633, 24619238, 211654405, 1731275594, 11581792513, 107195509553, 1126517154817, 16124559341513, 342648008481505, 8465982933121657, 213444061953471233
OFFSET
0,10
LINKS
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
Cf. A122025.
Sequence in context: A116847 A116848 A370800 * A244885 A116845 A307466
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Sep 13 2006
EXTENSIONS
Name edited and offset changed by G. C. Greubel, Oct 03 2019
STATUS
approved