OFFSET
1,5
COMMENTS
This is a (4,1) generalized Somos-4 sequence. - Michael Somos, May 12 2022
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..96
A. N. W. Hone, Algebraic curves, integer sequences and a discrete Painlevé transcendent, arXiv:0807.2538 [nlin.SI], 2008; Proceedings of SIDE 6, Helsinki, Finland, 2004.
FORMULA
a(n) = a(5-n) = (-a(n-1)*a(n-4) + 26*a(n-2)*a(n-3))/a(n-5) for all n in Z. - Michael Somos, May 12 2022
MAPLE
a:= proc(n) option remember;
if n < 5 then 1
else (4*a(n-1)*a(n-3) + a(n-2)^2)/a(n-4)
fi;
end proc;
seq(a(n), n = 1..30); # G. C. Greubel, Oct 08 2019
MATHEMATICA
a[n_]:= a[n]= If[n<5, 1, (4*a[n-1]a[n-3] + a[n-2]^2)/a[n-4]]; Table[a[n], {n, 30}]
PROG
(PARI) my(m=30, v=concat([1, 1, 1, 1], vector(m-4))); for(n=5, m, v[n] = (4*v[n-1]*v[n-3] + v[n-2]^2)/v[n-4]); v \\ G. C. Greubel, Oct 08 2019
(Magma) [n lt 5 select 1 else (4*Self(n-1)*Self(n-3) + Self(n-2)^2 )/Self(n-4): n in [1..30]]; // G. C. Greubel, Oct 08 2019
(Sage)
@CachedFunction
def a(n):
if (n<5): return 1
else: return (4*a(n-1)*a(n-3) + a(n-2)^2)/a(n-4)
[a(n) for n in (1..30)] # G. C. Greubel, Oct 08 2019
(GAP) a:=[1, 1, 1, 1];; for n in [5..30] do a[n]:=(4*a[n-1]*a[n-3] + a[n-2]^2)/a[n-4]; od; a; # G. C. Greubel, Oct 08 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Sep 09 2006
EXTENSIONS
Edited by N. J. A. Sloane, Sep 15 2006
STATUS
approved