OFFSET
0,6
COMMENTS
s(n) is a generalized Somos-5 sequence (A006721) having coefficients x, y in the recurrence numerator sum of products.
FORMULA
a(n) = a(4-n) for all n in Z.
EXAMPLE
a(7) = 4 because s(7) = x^3 + x^2*y + 2*x*y*z + y^2*z has 4 terms.
MATHEMATICA
a[ n_] := If[0 <= n <= 4, 1, RecurrenceTable[{s[m]*s[m - 5] == x*s[m - 1]*s[m - 4] + y*s[m - 2]*s[m - 3], s[0] == s[1] == s[2] == s[3] == s[4] == 1}, s, {m, Max[n, 4 - n]}] // Last // Factor // Expand // Length];
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael Somos, Mar 13 2020
STATUS
approved