cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A172485 The case S(-1,-2,3) of the family of self-convolutive recurrences studied by Martin and Kearney.

Original entry on oeis.org

1, -1, -1, 3, 3, -21, 27, 27, -117, 27, 459, -837, -405, 3483, -2997, -9477, 25515, -1701, -91125, 130491, 165483, -732645, 422091, 2136699, -4546773, -1712421, 19597707, -21237957, -43597845, 140635035, -32890293, -483552261, 804188331
Offset: 1

Views

Author

N. J. A. Sloane, Nov 20 2010

Keywords

Examples

			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 + ...
		

Programs

  • 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
  • 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 *)
  • 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 */
    

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