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.

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.

This page as a plain text file.
%I A331518 #22 Mar 06 2024 12:47:29
%S A331518 1,0,0,1,1,2,4,5,7,10,21,24,37,49,71,129,160,227,313,433,572,1012,
%T A331518 1213,1750,2315,3223,4159,5740,8945,11206,15402,20506,27545,36068,
%U A331518 48122,61960,94694,116240,158580,205397,276458,352526,470101,596433,781224,1111228
%N 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.
%C A331518 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
%H A331518 Vaclav Kotesovec, <a href="/A331518/b331518.txt">Table of n, a(n) for n = 0..10000</a>
%F A331518 G.f.: Sum_{k>=0} !k * x^(k*(k + 1)/2) / Product_{j=1..k} (1 - x^j).
%F A331518 a(n) = A369596(n,A161680(n)). - _Alois P. Heinz_, Mar 02 2024
%p A331518 g:= proc(n) option remember; `if`(n=0, 1, n*g(n-1)+(-1)^n) end:
%p A331518 b:= proc(n, i, m) option remember; `if`(n>i*(i+1)/2, 0,
%p A331518      `if`(n=0, g(m), b(n, i-1, m)+b(n-i, min(n-i, i-1), m+1)))
%p A331518     end:
%p A331518 a:= n-> b(n$2, 0):
%p A331518 seq(a(n), n=0..45);  # _Alois P. Heinz_, Mar 02 2024
%t A331518 Table[Sum[Length[Select[IntegerPartitions[n, {k}], UnsameQ @@ # &]] Subfactorial[k], {k, 0, n}], {n, 0, 45}]
%t A331518 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]
%t A331518 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 *)
%Y A331518 Cf. A000166, A008289, A032020, A331517.
%Y A331518 Cf. A161680, A369596.
%K A331518 nonn
%O A331518 0,6
%A A331518 _Ilya Gutkovskiy_, Jan 19 2020