OFFSET
1,6
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
R. W. Gosper and Richard C. Schroeppel, Somos Sequence Near-Addition Formulas and Modular Theta Functions, arXiv:math/0703470 [math.NT]. See pp. 10,11.
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,0,0,0,1,-2,1).
FORMULA
Eight interlaced quadratic progressions: deg(s_{8q+r}) = (4q + r)q + [-2,0,0,0,1,1,2,3]_r, 0 <= r <= 7.
G.f.: x^4 * (1 - x + x^2 - 2*x^4 + 4*x^5 - 2*x^6) / ((1 - x)^2 * (1 - x^8)). - Michael Somos, Jan 19 2015
a(n) = a(-n) for all n in Z. - Michael Somos, Jan 19 2015
a(4*n + 1) = A035608(n), a(4*n + 2) = A002378(n), a(4*n + 3) = A156859(n). - Michael Somos, Jan 19 2015
EXAMPLE
G.f. = x^4 + x^5 + 2*x^6 + 3*x^7 + 2*x^8 + 5*x^9 + 6*x^10 + 7*x^11 + ...
MATHEMATICA
a[ n_] := If[ Divisible[ n, 8], -2 + n^2 / 16, Quotient[ 2 n^2 - 5 (-1)^n + 5, 32]]; (* Michael Somos, Jan 20 2015 *)
CoefficientList[Series[x^3 (1 - x + x^2 - 2 x^4 + 4 x^5 - 2 x^6) / ((1 - x)^2 (1 - x^8)), {x, 0, 70}], x] (* Vincenzo Librandi, Jan 20 2015 *)
LinearRecurrence[{2, -1, 0, 0, 0, 0, 0, 1, -2, 1}, {0, 0, 0, 1, 1, 2, 3, 2, 5, 6}, 70] (* Harvey P. Dale, Feb 28 2023 *)
PROG
(PARI) {a(n) = if( n%8==0, -2 + n^2 / 16, (2*n^2 - 5*(-1)^n + 5) \ 32)}; /* Michael Somos, Jan 19 2015 */
(PARI) concat(vector(3), Vec(x^4*(2*x^6-4*x^5+2*x^4-x^2+x-1)/((x-1)^3*(x+1)*(x^2+1)*(x^4+1)) + O(x^100))) \\ Colin Barker, Jul 17 2015
(Magma) I:=[0, 0, 0, 1, 1, 2, 3, 2, 5, 6]; [n le 10 select I[n] else 2*Self(n-1)-Self(n-2)+Self(n-8)-2*Self(n-9)+Self(n-10): n in [1..70]]; // Vincenzo Librandi, Jan 20 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 16 2014
STATUS
approved