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 A102291 #19 Oct 30 2020 15:03:53 %S A102291 0,0,1,3,7,18,42,98,222,497,1100,2413,5250,11350,24398,52193,111180, %T A102291 235949,499074,1052502,2213710,4644833,9724492,20318637,42376578, %U A102291 88231765,183420748,380755932,789340736,1634339217,3379993922,6982618822,14410499598,29711523105 %N A102291 Total number of prime parts in all compositions of n. %H A102291 Alois P. Heinz, <a href="/A102291/b102291.txt">Table of n, a(n) for n = 0..3313</a> %F A102291 G.f.: Sum_{k>=1} x^prime(k)*(1-x)^2/(1-2*x)^2. %F A102291 a(n) = Sum_{k=1..floor(n/2)} k * A224344(n,k). - _Alois P. Heinz_, Aug 06 2019 %p A102291 a:= proc(n) option remember; `if`(n=0, 0, add(a(n-j)+ %p A102291 `if`(isprime(j), ceil(2^(n-j-1)), 0), j=1..n)) %p A102291 end: %p A102291 seq(a(n), n=0..33); # _Alois P. Heinz_, Aug 06 2019 %t A102291 a[n_] := a[n] = If[n==0, 0, Sum[a[n-j] + If[PrimeQ[j], Ceiling[2^(n-j-1)], 0], {j, 1, n}]]; %t A102291 a /@ Range[0, 33] (* _Jean-François Alcover_, Oct 30 2020, after _Alois P. Heinz_ *) %Y A102291 Cf. A037032, A224344, A336632. %K A102291 easy,nonn %O A102291 0,4 %A A102291 _Vladeta Jovovic_, Feb 19 2005 %E A102291 More terms from _Joshua Zucker_, May 10 2006