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 A336579 #17 Mar 17 2022 14:53:31 %S A336579 0,0,2,7,14,38,83,193,421,917,1969,4210,8908,18763,39287,81940,170270, %T A336579 352726,728663,1501711,3088326,6339424,12991312,26583389,54323352, %U A336579 110876435,226057023,460432903,936963134,1905110662,3870698364,7858803605,15945759386 %N A336579 Sum of prime parts, counted without multiplicity, in all compositions of n. %H A336579 Alois P. Heinz, <a href="/A336579/b336579.txt">Table of n, a(n) for n = 0..1000</a> %e A336579 a(4) = 2 + 2 + 2 + 2 + 3 + 3 = 14: 1111, 11(2), 1(2)1, (2)11, (2)2, 1(3), (3)1, 4. %p A336579 b:= proc(n, i, p) option remember; `if`(n=0, [p!, 0], %p A336579 `if`(i<1, 0, add((p-> [0, `if`(j>0 and isprime(i), %p A336579 p[1]*i, 0)]+p)(b(n-i*j, i-1, p+j)/j!), j=0..n/i))) %p A336579 end: %p A336579 a:= n-> b(n$2, 0)[2]: %p A336579 seq(a(n), n=0..38); %t A336579 b[n_, i_, p_] := b[n, i, p] = If[n == 0, {p!, 0}, %t A336579 If[i < 1, {0, 0}, Sum[Function[q, {0, If[j > 0 && PrimeQ[i], %t A336579 q[[1]]*i, 0]} + q][b[n - i*j, i - 1, p + j]/j!], {j, 0, n/i}]]]; %t A336579 a[n_] := b[n, n, 0][[2]]; %t A336579 Table[a[n], {n, 0, 38}] (* _Jean-François Alcover_, Mar 17 2022, after _Alois P Heinz_ *) %Y A336579 Cf. A000040, A097939, A102712, A309561, A336516, A336632. %K A336579 nonn %O A336579 0,3 %A A336579 _Alois P. Heinz_, Jul 26 2020