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.

Showing 1-2 of 2 results.

A331518 a(n) = Sum_{k=0..n} q(n,k) * !k, where q(n,k) = number of partitions of n into k distinct parts and !k = subfactorial of k.

Original entry on oeis.org

1, 0, 0, 1, 1, 2, 4, 5, 7, 10, 21, 24, 37, 49, 71, 129, 160, 227, 313, 433, 572, 1012, 1213, 1750, 2315, 3223, 4159, 5740, 8945, 11206, 15402, 20506, 27545, 36068, 48122, 61960, 94694, 116240, 158580, 205397, 276458, 352526, 470101, 596433, 781224, 1111228
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 19 2020

Keywords

Comments

a(n) is the number of permutations of [n] whose fixed points sum to n*(n-1)/2. a(6) = 4: 143256, 231456, 312456, 523416. - Alois P. Heinz, Mar 02 2024

Crossrefs

Programs

  • Maple
    g:= proc(n) option remember; `if`(n=0, 1, n*g(n-1)+(-1)^n) end:
    b:= proc(n, i, m) option remember; `if`(n>i*(i+1)/2, 0,
         `if`(n=0, g(m), b(n, i-1, m)+b(n-i, min(n-i, i-1), m+1)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..45);  # Alois P. Heinz, Mar 02 2024
  • Mathematica
    Table[Sum[Length[Select[IntegerPartitions[n, {k}], UnsameQ @@ # &]] Subfactorial[k], {k, 0, n}], {n, 0, 45}]
    nmax = 45; CoefficientList[Series[Sum[Subfactorial[k] x^(k (k + 1)/2)/Product[(1 - x^j), {j, 1, k}], {k, 0, nmax}], {x, 0, nmax}], x]
    nmax = 50; CoefficientList[Series[Sum[Subfactorial[k] * x^(k*(k+1)/2) / Product[(1 - x^j), {j, 1, k}], {k, 0, Sqrt[2*nmax]}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Jan 28 2020 *)

Formula

G.f.: Sum_{k>=0} !k * x^(k*(k + 1)/2) / Product_{j=1..k} (1 - x^j).
a(n) = A369596(n,A161680(n)). - Alois P. Heinz, Mar 02 2024

A331826 Coefficients in asymptotic expansion of sequence A101880.

Original entry on oeis.org

1, 1, 2, 5, 16, 60, 253, 1180, 6023, 33306, 197719, 1250906, 8387942, 59357195, 441685485, 3444965562, 28082207264, 238628007349, 2108871422308, 19343221199365, 183810517195168, 1806639257820732, 18339886099839327, 192028550724708334, 2071309027341071260
Offset: 0

Views

Author

Vaclav Kotesovec, Jan 28 2020

Keywords

Examples

			A101880(n) / n! ~ 1 + 1/n + 2/n^2 + 5/n^3 + 16/n^4 + 60/n^5 + 253/n^6 + ...
A331517(n) / (exp(-1) * n!) ~ 1 + 1/n + 2/n^2 + 5/n^3 + 16/n^4 + 60/n^5 + 253/n^6 + ...
		

Crossrefs

Showing 1-2 of 2 results.