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.

A334716 a(n) = !n + n * n!, where !n = A000166(n) is subfactorial of n.

Original entry on oeis.org

1, 1, 5, 20, 105, 644, 4585, 37134, 337393, 3399416, 37622961, 453769370, 5924234041, 83242063332, 1252567177849, 20096182035734, 342461702459745, 6177536369911664, 117598028364137953, 2356007639327453106, 49553054794725702121, 1091705092860949184540
Offset: 0

Views

Author

Alois P. Heinz, May 08 2020

Keywords

Crossrefs

Main diagonal of A334715.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, [1, 1, 5][n+1],
          ((2*n+1)*(n-1)*a(n-1)-(n-1)*(n^2-2*n-2)*a(n-2)
           -(n+1)*(n-1)*(n-2)*a(n-3))/n)
        end:
    seq(a(n), n=0..23);
  • Mathematica
    a[n_] := Subfactorial[n] + n n!;
    a /@ Range[0, 23] (* Jean-François Alcover, Apr 26 2021 *)

Formula

E.g.f.: x/(x-1)^2 - exp(-x)/(x-1).
a(n) = A000166(n) + A001563(n) = !n + n * n!.