OFFSET
0,5
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..90
R. W. Gosper and Richard C. Schroeppel, Somos Sequence Near-Addition Formulas and Modular Theta Functions, arXiv:math/0703470 [math.NT], 2007. See h_n.
FORMULA
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
MAPLE
f:=proc(n) option remember;
if n <= 2 then -1+n
elif n=3 then -1
elif n=4 then -8
elif n=5 then 57
elif n=6 then 455
else -(8*f(n-4)*f(n-1)-57*f(n-3)*f(n-2))/f(n-5); fi; end;
[seq(f(n), n=0..30)];
MATHEMATICA
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 *)
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 *)
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 *)
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 *)
PROG
(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
(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 */
(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 */
CROSSREFS
KEYWORD
sign
AUTHOR
N. J. A. Sloane, May 18 2014
STATUS
approved