OFFSET
1,4
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
R. J. Martin and M. J. Kearney, An exactly solvable self-convolutive recurrence, arXiv:1103.4936 [math.CO], 2011.
R. J. Martin and M. J. Kearney, An exactly solvable self-convolutive recurrence, Aequat. Math., 80 (2010), 291-318. see p. 311.
Index entries for linear recurrences with constant coefficients, signature (-3, -6, -6).
FORMULA
a(n) = - (n + 2) * a(n-1) + 3 * Sum_{k=1..n} a(k-1) * a(n-k) if n>0. - Michael Somos, Jul 24 2011
G.f.: (x + 2*x^2 + 2*x^3) / (1 + 3*x + 6*x^2 + 6*x^3).
a(n) = -3 * (a(n-1) + 2*a(n-2) + 2*a(n-3)) if n>3.
G.f.: x / (1 + x / (1 - 2*x / (1 + 2*x / (1 - x / (1 + 3*x))))). - Michael Somos, Jan 03 2013
EXAMPLE
G.f. = x - x^2 - x^3 + 3*x^4 + 3*x^5 - 21*x^6 + 27*x^7 + 27*x^8 - 117*x^9 + ...
MATHEMATICA
CoefficientList[Series[1/(1 + x/(1 - 2*x/(1 + 2*x/(1 - x/(1 + 3*x))))), {x, 0, 40}], x] (* Vincenzo Librandi, Jan 03 2013 *)
PROG
(PARI) {a(n) = local(A); if( n<1, 0, A = vector(n); A[1] = 1; for( k=2, n, A[k] = -(k + 2) * A[k-1] + 3 * sum( j=1, k-1, A[j] * A[k-j])); A[n])}; /* Michael Somos, Jul 24 2011 */
(Magma) I:=[1, -1, -1, 3, 3, -21]; [n le 6 select I[n] else -3*(Self(n-1)+2*Self(n-2)+2*Self(n-3)): n in [1..40]]; // Vincenzo Librandi, Jan 03 2013
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Nov 20 2010
STATUS
approved