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.

A375836 Number of chains in the poset of permutations of [n].

Original entry on oeis.org

1, 1, 3, 17, 165, 2539, 57597, 1813797, 75733683, 4048845673, 269701306809, 21901093760303, 2129681860984785, 244316156443454237, 32650648748310672739, 5028367353617766838085, 884047390780977994754809, 175979907431515249448486007, 39376198947363790655257792497
Offset: 0

Views

Author

Rajesh Kumar Mohapatra, Aug 31 2024

Keywords

Examples

			Consider the set S = {1, 2, 3}. The a(3) = 6 + 8 + 3 = 17 in the poset of permutations of {1,2,3}:
|{(1)(2)(3), (1)(23), (2)(13), (3)(12), (123), (132)}| = 6;
|{(1)(2)(3) < (1)(23), (1)(2)(3) < (2)(13), (1)(2)(3) < (3)(12), (1)(2)(3) < (123),(1)(2)(3) < (132), (1)(23) < (123), (2)(13) < (132), (3)(12) < (123)}|=8;
|{(1)(2)(3) < (1)(23) < (123), (1)(2)(3) < (2)(13) < (132), (1)(2)(3) < (3)(12) < (123)}| = 3.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
          n!+add(abs(Stirling1(n, k))*a(k), k=1..n-1)
        end:
    seq(a(n), n=0..18);  # Alois P. Heinz, Jul 01 2025
  • Mathematica
    b[n_, k_, t_] := b[n, k, t] = If[k < 0, 0, If[Union@{n, k} == {0}, 1, Sum[If[k == 1, 1, b[v, k - 1, 1]]*Abs[StirlingS1[n, v]], {v, k, n - t}]]];
    a[n_] := Sum[b[n, k, 0], {k, 0, n}]; a /@ Range[0, 20]
  • Python
    from math import factorial as f
    from sympy.functions.combinatorial.numbers import stirling as s
    from functools import cache
    @cache
    def a(n): return f(n) + sum(abs(s(n, k, kind=1)) * a(k) for k in range(1, n)) # David Radcliffe, Jul 01 2025

Formula

a(n) = Sum_{k=0..n} A375835(n,k).
a(n) = n! + Sum_{k=1..n-1} abs(Stirling1(n,k))*a(k). - Rajesh Kumar Mohapatra, Jul 01 2025
a(n) = 2 * A375838(n) - 1. - Rajesh Kumar Mohapatra, Jul 01 2025