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.

A339034 Row sums of A339033.

Original entry on oeis.org

1, 1, 4, 11, 35, 147, 805, 5399, 42273, 375787, 3728261, 40788255, 487539769, 6319430483, 88272658797, 1321745733511, 21117967813025, 358591883025339, 6448525343069653, 122424951294889967, 2446864618294774281, 51354975368171586595, 1129258990476358286909
Offset: 0

Views

Author

Peter Luschny, Nov 20 2020

Keywords

Crossrefs

Cf. A339033.

Programs

  • Mathematica
    A339034[n_] := If[n == 0, 1, n! + Sum[(n+1-k)*(k-1)!, {k, n-1}]];
    Array[A339034, 25, 0] (* Paolo Xausa, Jan 31 2024 *)
  • PARI
    a(n) = if (n==0, 1, n! - (n-1)! + sum(k=1, n, (n+1-k)*(k-1)!)); \\ Michel Marcus, Dec 02 2020
  • SageMath
    def A339034(n):
        if n == 0: return 1
        d = factorial(n) - factorial(n - 1)
        return add((n + 1 - k)*factorial(k - 1) for k in (1..n)) + d
    print([A339034(n) for n in (0..22)])
    

Formula

a(n) = n! - (n - 1)! + Sum_{k=1..n} (n + 1 - k)*(k - 1)! for n > 0.