%I #30 Nov 04 2023 20:13:37
%S -1,0,1,-1,-8,57,455,-22352,-47767,69739671,-3385862936,
%T -1747973613295,632038062613231,319807929289790304,
%U -778756000716629557903,-186509371006506937278833,7581885296067966478838810840,-17592286469464275110206466526327,-594744699237794019378328459208828297
%N a(n) = -(8*a(n-4)*a(n-1) - 57*a(n-3)*a(n-2))/a(n-5) with initial values -1, 0, 1, -1, -8, 57, 455.
%H Harvey P. Dale, <a href="/A241595/b241595.txt">Table of n, a(n) for n = 0..90</a>
%H R. W. Gosper and Richard C. Schroeppel, <a href="https://arxiv.org/abs/math/0703470">Somos Sequence Near-Addition Formulas and Modular Theta Functions</a>, arXiv:math/0703470 [math.NT], 2007. See h_n.
%F a(n+1) = -A360381(2*n), a(n+2)*a(n-2) = a(n+1)*a(n-1) + 8*a(n)^2 for all n in Z. - _Michael Somos_, Feb 05 2023
%p f:=proc(n) option remember;
%p if n <= 2 then -1+n
%p elif n=3 then -1
%p elif n=4 then -8
%p elif n=5 then 57
%p elif n=6 then 455
%p else -(8*f(n-4)*f(n-1)-57*f(n-3)*f(n-2))/f(n-5); fi; end;
%p [seq(f(n),n=0..30)];
%t nxt[{a_,b_,c_,d_,e_,f_,g_}]:={b,c,d,e,f,g,-(8d*g-57e*f)/c}; Transpose[ NestList[ nxt,{-1,0,1,-1,-8,57,455},20]][[1]] (* _Harvey P. Dale_, Jun 23 2014 *)
%t Join[{-1, 0, 1, -1, -8, 57, 455}, RecurrenceTable[{a[n] == -(8*a[n - 4]*a[n - 1] - 57*a[n - 3]*a[n - 2])/a[n - 5], a[7] == -22352, a[8] == -47767, a[9] == 69739671, a[10] == -3385862936, a[11] == -1747973613295}, a, {n, 7, 25}]] (* _G. C. Greubel_, Aug 06 2018 *)
%t a[ n_] := With[{m = n-1}, Module[{A = Table[1, Max[4, Abs[m]]]}, A[[2]] = -1; A[[3]] = -8; A[[4]] = 57; Do[ A[[k]] = (A[[k-1]]*A[[k-3]] + 8*A[[k-2]]*A[[k-2]])/A[[k-4]], {k, 5, Length[A]}]; If[m==0, 0, Sign[m]*A[[Abs[m]]]] ]]; (* _Michael Somos_, Feb 05 2023 *)
%t a[ n_] := With[{m = 2*n-2}, Module[{A = Table[1, Max[5, Abs[m]]]}, A[[2]] = -1; A[[5]] = -7; Do[ A[[k]] = (A[[k-1]]*A[[k-4]] + A[[k-2]]*A[[k-3]])/A[[k-5]], {k, 6, Length[A]}]; If[m==0, 0, -Sign[m]*A[[Abs[m]]]] ]]; (* _Michael Somos_, Nov 03 2023 *)
%o (Magma) I:=[-22352, -47767, 69739671, -3385862936, -1747973613295]; [-1, 0, 1, -1, -8, 57, 455] cat [n le 5 select I[n] else -(8*Self(n-4)*Self(n-1) - 57*Self(n-3)*Self(n-2))/Self(n-5): n in [1..20]]; // _G. C. Greubel_, Aug 06 2018
%o (PARI) {a(n) = n--; my(A = vector(max(4, abs(n)), k, 1)); A[2] = -1; A[3] = -8; A[4] = 57; for(k=5, #A, A[k] = (A[k-1]*A[k-3] + 8*A[k-2]*A[k-2])/A[k-4]); if(n==0, 0, sign(n)*A[abs(n)])}; /* _Michael Somos_, Feb 05 2023 */
%o (PARI) {a(n) = n=2*n-2; my(A = vector(max(5, abs(n)), k, 1)); A[2] = -1; A[5] = -7; for(k=6, #A, A[k] = (A[k-1]*A[k-4] + A[k-2]*A[k-3])/A[k-5]); if(n==0, 0, -sign(n)*A[abs(n)])}; /* _Michael Somos_, Nov 03 2023 */
%Y See A241594 for another version.
%Y Cf. A360381.
%K sign
%O 0,5
%A _N. J. A. Sloane_, May 18 2014