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.

A075374 a(n+2) = n*a(n+1) - a(n), with a(1)=1, a(2)=2.

Original entry on oeis.org

1, 2, 1, 0, -1, -4, -19, -110, -751, -5898, -52331, -517412, -5639201, -67153000, -867349799, -12075744186, -180268812991, -2872225263670, -48647560669399, -872783866785512, -16534245908255329, -329812134298321068, -6909520574356487099, -151679640501544395110
Offset: 1

Views

Author

Amarnath Murthy, Sep 20 2002

Keywords

Comments

Starting with offset 5 unsigned: (1, 4, 19, 110, 751, ...) = eigensequence of triangle A003991. - Gary W. Adamson, May 17 2010

Crossrefs

Cf. A003991. - Gary W. Adamson, May 17 2010

Programs

  • Magma
    [n le 2 select n else (n-2)*Self(n-1) - Self(n-2): n in [1..50]]; // G. C. Greubel, Mar 04 2022
    
  • Maple
    a[1] := 1:a[2] := 2:for n from 1 to 45 do a[n+2] := n*a[n+1]-a[n]:od:seq(a[i],i=1..45);
  • Mathematica
    a[n_]:= a[n]= If[n<3, n, (n-2)*a[n-1] -a[n-2]];
    Table[a[n], {n,50}] (* G. C. Greubel, Mar 04 2022 *)
  • Sage
    @CachedFunction
    def a(n): return n if (n<3) else (n-2)*a(n-1) - a(n-2) # A075374
    [a(n) for n in (1..50)] # G. C. Greubel, Mar 04 2022

Formula

a(n+1) = (a(n) + a(n+2))/n with a(1) = 1, a(2) = 2.

Extensions

More terms from Sascha Kurz, Jan 30 2003