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.

A336516 Sum of parts, counted without multiplicity, in all compositions of n.

This page as a plain text file.
%I A336516 #26 Mar 11 2022 09:55:23
%S A336516 0,1,3,10,24,59,136,309,682,1493,3223,6904,14675,31013,65202,136512,
%T A336516 284748,592082,1227709,2539516,5241640,10798133,22206568,45597489,
%U A336516 93495667,191464970,391636718,800233551,1633530732,3331568080,6789078236,13824212219,28129459098
%N A336516 Sum of parts, counted without multiplicity, in all compositions of n.
%H A336516 Alois P. Heinz, <a href="/A336516/b336516.txt">Table of n, a(n) for n = 0..1000</a>
%e A336516 a(4) = 1 + 1 + 2 + 1 + 2 + 1 + 2 + 2 + 1 + 3 + 3 + 1 + 4 = 24: (1)111, (1)1(2), (1)(2)1, (2)(1)1, (2)2, (1)(3), (3)(1), (4).
%p A336516 b:= proc(n, i, p) option remember; `if`(n=0, [p!, 0],
%p A336516       `if`(i<1, 0, add((p-> [0, `if`(j=0, 0, p[1]*i)]+p)(
%p A336516          b(n-i*j, i-1, p+j)/j!), j=0..n/i)))
%p A336516     end:
%p A336516 a:= n-> b(n$2, 0)[2]:
%p A336516 seq(a(n), n=0..38);
%t A336516 b[n_, i_, p_] := b[n, i, p] = If[n == 0, {p!, 0},
%t A336516      If[i < 1, {0, 0}, Sum[Function[{0, If[j == 0, 0, #[[1]]*i]} + #][
%t A336516        b[n - i*j, i - 1, p + j]/j!], {j, 0, n/i}]]];
%t A336516 a[n_] := b[n, n, 0][[2]];
%t A336516 Table[a[n], {n, 0, 38}] (* _Jean-François Alcover_, Mar 11 2022, after _Alois P. Heinz_ *)
%Y A336516 Cf. A001787 (all parts), A014153 (the same for partitions), A336511, A336512, A336579, A336875.
%K A336516 nonn
%O A336516 0,3
%A A336516 _Alois P. Heinz_, Jul 24 2020