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.

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

Original entry on oeis.org

1, 1, 1, 1, 1, -3, -7, -3, 5, 25, 45, -3, -107, -191, -175, 253, 1045, 1189, -171, -3547, -7527, -4603, 11497, 33945, 40869, -10487, -141071, -248407, -120131, 421141, 1227961, 1332777, -726439, -5051271, -8369959, -3306635, 16738977, 43110597, 41391949, -33360335, -183387403, -283721435
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

  • Magma
    [n le 5 select 1 else Self(n-1) -2*Self(n-2) +Self(n-3) -6*Self(n-4) +3*Self(n-5): n in [1..50]]; // G. C. Greubel, Nov 28 2021
    
  • Maple
    A122583:= proc(n) option remember; if n <= 5 then 1; else A122583(n-1) -2*A122583(n-2)+A122583(n-3)+3*(-2*A122583(n-4)+A122583(n-5)); fi; end: seq(A122583(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] -6*a[n-4] +3*a[n-5]];
    Table[a[n], {n, 50}]
    LinearRecurrence[{1,-2,1,-6,3},{1,1,1,1,1},50] (* Harvey P. Dale, Jun 09 2025 *)
  • Sage
    @CachedFunction # a=A122583
    def a(n): return 1 if (n<6) else a(n-1) -2*a(n-2) +a(n-3) -6*a(n-4) +3*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 +7*x^4)/(1 -x +2*x^2 -x^3 +6*x^4 -3*x^5). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009

Extensions

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