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.

A122581 a(n) = a(n - 1) - 2*a(n - 2) + a(n - 3) - 4*a(n - 4) + 2*a(n - 5).

Original entry on oeis.org

1, 1, 1, 1, 1, -2, -5, -2, 4, 13, 19, -5, -50, -65, -20, 118, 283, 187, -311, -914, -1001, 334, 3040, 4405, 835, -8273, -17030, -11189, 20068, 60178, 60427, -29165, -192491, -274310, -39845, 553798, 1070812, 635629, -1341437, -3836765, -3693914, 2237287, 12425356, 16921054, 1409755, -36343973
Offset: 1

Views

Author

Roger L. Bagula, Sep 19 2006

Keywords

Comments

This recursion is inspired by Ulam's early experiments in derivative recursions.

Crossrefs

Programs

  • Maple
    A122581:= proc(n) option remember; if n <= 5 then 1; else A122581(n-1) -2*A122581(n-2)+A122581(n-3)+2*(-2*A122581(n-4)+A122581(n-5)); fi; end: seq(A122581(n),n=1..50) ; # R. J. Mathar, Sep 18 2007
  • Mathematica
    a[n_]:= a[n]= If[n<6, 1, a[n-1] -2*a[n-2] +a[n-3] -2*(2*a[n-4] -a[n-5])];
    Table[a[n], {n,50}]
  • Sage
    @CachedFunction # a=A122581
    def a(n): return 1 if (n<6) else a(n-1) -2*a(n-2) +a(n-3) -4*a(n-4) +2*a(n-5)
    [a(n) for n in (1..50)] # G. C. Greubel, Nov 28 2021

Formula

G.f.: x*(1+2*x^2+x^3+5*x^4)/(1-x+2*x^2-x^3+4*x^4-2*x^5). - R. J. Mathar, Nov 18 2007

Extensions

Edited by N. J. A. Sloane, Oct 01 2006
More terms from R. J. Mathar, Sep 18 2007