A180510 G.f.: (t^5 + 2*t^4 + t^3 + 2*t^2 + t) / (t^6 + t^5 - 2*t^4 - 5*t^3 - 2*t^2 + t + 1).
0, 1, 1, 2, 7, 5, 20, 27, 49, 106, 155, 331, 560, 1013, 1917, 3310, 6223, 11117, 20140, 36899, 66185, 121014, 218791, 396703, 721280, 1305025, 2371433, 4298618, 7796439, 14150029, 25652500, 46550531, 84427441, 153141122, 277824947, 503893035, 914114320, 1658100757, 3007674389, 5455918726, 9896444495, 17951959061, 32563657260
Offset: 0
Examples
G.f. = x + x^2 + 2*x^3 + 7*x^4 + 5*x^5 + 20*x^6 + 27*x^7 + 49*x^8 + 106*x^9 + ... - _Michael Somos_, Dec 30 2022
References
- Found by Noam D. Elkies and described in an email from Elkies to R. K. Guy, Jan 18 2011
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..300 (corrected by Ray Chandler, Jan 19 2019)
- E. L. Roettger, H. C. Williams, and R. K. Guy, Some extensions of the Lucas functions, Number Theory and Related Fields: In Memory of Alf van der Poorten, Series: Springer Proceedings in Mathematics & Statistics, Vol. 43, J. Borwein, I. Shparlinski, W. Zudilin (Eds.) 2013.
- Index to divisibility sequences
- Index entries for linear recurrences with constant coefficients, signature (-1,2,5,2,-1,-1).
Programs
-
Mathematica
CoefficientList[ Series[(x^5 + 2x^4 + x^3 + 2x^2 + x)/(x^6 + x^5 - 2x^4 - 5x^3 - 2x^2 + x + 1), {x, 0, 42}], x] (* Robert G. Wilson v, Jun 26 2011 *) a[1] = 0; a[2] = 1; a[3] = 1; a[4] = 2; a[5] = 7; a[6] = 5; a[n_Integer] := a[n] = -a[n - 6] - a[n - 5] + 2 a[n - 4] + 5 a[n - 3] + 2 a[n - 2] - a[n - 1] (* Or *) LinearRecurrence[{-1, 2, 5, 2, -1, -1}, {0, 1, 1, 2, 7, 5}, 43] (* Roger L. Bagula, Mar 16 2012 *) a[ n_] := a[n] = Sign[n]*With[{m = Abs[n]}, If[ m<4, {0, 1, 1, 2}[[m+1]], -a[m-1] +2*a[m-2] +5*a[m-3] +2*a[m-4] -a[m-5] -a[m-6]]]; (* Michael Somos, Dec 30 2022 *)
-
Maxima
makelist(coeff(taylor(x*(x^4+2*x^3+x^2+2*x+1)/(x^6+x^5-2*x^4-5*x^3-2*x^2+x+1), x, 0, n), x, n), n, 1, 42); /* Bruno Berselli, Jun 05 2011 */
-
PARI
Vec((x^5+2*x^4+x^3+2*x^2+x)/(x^6+x^5-2*x^4-5*x^3-2*x^2+x+1)+O(x^99)) \\ Charles R Greathouse IV, Jun 06 2011
-
PARI
{a(n) = sign(n)*polcoeff((x^5 + 2*x^4 + x^3 + 2*x^2 + x)/(x^6 + x^5 - 2*x^4 - 5*x^3 - 2*x^2 + x + 1) + x*O(x^abs(n)), abs(n))}; /* Michael Somos, Dec 30 2022 */
Formula
a(n) = -a(-n) for all n in Z. - Michael Somos, Dec 30 2022
Comments