OFFSET
0,9
COMMENTS
If (x, y, s(0), .., s(4)) are 7 variables and s(n) = (x*s(n-1)*s(n-4) + y*s(n-2)*s(n-3))/s(n-5) for n>=5 is the generalized Somos-5 sequence, then s(n) is a Laurent polynomial in the variables with the numerator being irreducible and the denominator is Product_{k=0..4} s(k)^a(n-k).
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,1,-1,0,0,0,1,-1,-1,1).
FORMULA
G.f.: -(1 - x - x^2 + x^3 - x^5)/((1 - x)*(1 - x^2)*(1 - x^7)).
a(n) = max( a(n-1) + a(n-4), a(n-2) + a(n-3) ) - a(n-5) for all n in Z.
a(n) = a(n+7) - 2 - floor(n/2) for all n in Z.
Second difference has period 14.
EXAMPLE
G.f. = -1 + x^5 + x^6 + x^7 + 2*x^8 + 3*x^9 + 3*x^10 + 4*x^11 + ...
s(7) = ((s(0)*s(3)^2*s(4) + s(1)^2*s(4)^2)*x*y + s(1)*s(2)*s(3)*s(4)*(y^2+x^3) + s(2)^2*s(3)^2*x^2*y)/(s(0)^1*s(1)^1*s(2)^1*s(3)^0*s(4)^0).
MATHEMATICA
a[ n_] := With[{m = Mod[n, 14]}, Quotient[n^2, 28] - Boole[m==0] + Boole[m==5] + Boole[m==9]];
a[ n_] := SeriesCoefficient[ -(1 - x - x^2 + x^3 - x^5) / ((1 - x) * (1 - x^2) * (1 - x^7)), {x, 0, Abs@n}];
PROG
(PARI) {a(n) = n^2\28 - (n%14==0) + (n%14==5) + (n%14==9)};
(PARI) {a(n) = n=abs(n); polcoeff( -(1 - x - x^2 + x^3 - x^5) / ((1 - x) * (1 - x^2) * (1 - x^7)) + x * O(x^n), n)};
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Michael Somos, Mar 13 2020
STATUS
approved