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.
%I A373305 #16 Jun 08 2024 01:46:30 %S A373305 0,1,1,5,7,15,41,77,161,325,727,1460,3058,6228,12815,26447,54099, %T A373305 110800,226247,461531,939678,1914189,3890279,7905962,16045367, %U A373305 32550830,65971827,133645098,270561031,547468214,1107208235,2238242852,4522679064,9135128917 %N A373305 Sum over all complete compositions of n of the element set cardinality. %C A373305 A complete composition of n has element set [k] with k<=n (without gaps). %H A373305 Alois P. Heinz, <a href="/A373305/b373305.txt">Table of n, a(n) for n = 0..1000</a> %F A373305 a(n) = Sum_{k=0..A003056(n)} k * A373118(n,k). %e A373305 a(1) = 1: 1. %e A373305 a(2) = 1: 11. %e A373305 a(3) = 5 = 2 + 2 + 1: 12, 21, 111. %e A373305 a(4) = 7 = 2 + 2 + 2 + 1: 112, 121, 211, 1111. %e A373305 a(5) = 15 = 7*2 + 1: 122, 212, 221, 1112, 1121, 1211, 2111, 11111. %p A373305 g:= proc(n, i, t) `if`(n=0, `if`(i=0, t!, 0), %p A373305 `if`(i<1 or n<i*(i+1)/2, 0, b(n, i, t))) %p A373305 end: %p A373305 b:= proc(n, i, t) option remember; %p A373305 add(g(n-i*j, i-1, t+j)/j!, j=1..n/i) %p A373305 end: %p A373305 a:= n-> add(g(n, k, 0)*k, k=0..floor((sqrt(1+8*n)-1)/2)): %p A373305 seq(a(n), n=0..33); %t A373305 g[n_, i_, t_] := If[n == 0, If[i == 0, t!, 0], If[i < 1 || n < i*(i+1)/2, 0, b[n, i, t]]]; %t A373305 b[n_, i_, t_] := b[n, i, t] = Sum[g[n-i*j, i-1, t+j]/j!, {j, 1, n/i}]; %t A373305 a[n_] := Sum[g[n, k, 0]*k, {k, 0, Floor[(Sqrt[1 + 8*n] - 1)/2]}]; %t A373305 Table[a[n], {n, 0, 33}] (* _Jean-François Alcover_, Jun 08 2024, after _Alois P. Heinz_ *) %Y A373305 Cf. A003056, A107429, A373118, A373306. %K A373305 nonn %O A373305 0,4 %A A373305 _Alois P. Heinz_, May 31 2024