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.

A065355 a(n) = n! - Sum_{k=0..n-1} k!.

Original entry on oeis.org

1, 0, 0, 2, 14, 86, 566, 4166, 34406, 316646, 3219686, 35878886, 435046886, 5704064486, 80428314086, 1213746099686, 19521187251686, 333363035571686, 6024361885107686, 114864714882483686, 2304476522241459686
Offset: 0

Views

Author

Floor van Lamoen, Oct 31 2001

Keywords

Comments

For n > 1, the factorial base representation of a(n) is {n-2, n-3, ..., 1, 0}, i.e., the numbers 0..(n-2) in descending order. - Amiram Eldar, Apr 24 2021

Crossrefs

Programs

  • Mathematica
    Table[ n! - Sum[k!, {k, 0, n - 1} ], {n, 0, 20} ]
  • PARI
    a(n) = n! - sum(k=0, n-1, k!); \\ Harry J. Smith, Oct 17 2009
    
  • Python
    from sympy import factorial
    left_factorial = lambda n: left_factorial(n - 1) + factorial(n - 1) if n > 0 else 0
    a = lambda n: factorial(n) - left_factorial(n) # Darío Clavijo, Feb 16 2024

Formula

a(n) = A000142(n) - A003422(n). - Darío Clavijo, Feb 16 2024