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.

A110149 a(0) = 1, a(1) = 3; for n>1, a(n) = n*a(n-1) + (-1)^n.

Original entry on oeis.org

1, 3, 7, 20, 81, 404, 2425, 16974, 135793, 1222136, 12221361, 134434970, 1613219641, 20971855332, 293605974649, 4404089619734, 70465433915745, 1197912376567664, 21562422778217953, 409686032786141106, 8193720655722822121, 172068133770179264540
Offset: 0

Views

Author

Philippe Deléham, Sep 04 2005

Keywords

Comments

A000166, A001120 and A110043 have a similar recurrence.
a(n) = (n-1)*(a(n-1)+a(n-2)), n>2. - Gary Detlefs, Apr 11 2010

Crossrefs

Column k=3 of A334715.

Programs

  • Maple
    a:= proc(n) option remember;
          `if`(n<2, 2*n+1, n*a(n-1)+(-1)^n)
        end:
    seq(a(n), n=0..23);  # Alois P. Heinz, May 07 2020
  • Mathematica
    RecurrenceTable[{a[1]==3,a[n]==n a[n-1]+(-1)^n},a,{n,20}]  (* Harvey P. Dale, Nov 21 2011 *)

Formula

a(n) = A110043(n) + n! = A001120(n) + 2*n! = A000166(n) + 3*n! for n>0.
a(n) = 3*n! + floor((n!+1)/e) for n>0. - Gary Detlefs, Apr 11 2010
E.g.f.: (3*exp(x)*x+1)*exp(-x)/(1-x). - Alois P. Heinz, May 07 2020

Extensions

a(0)=1 prepended by Alois P. Heinz, May 07 2020