login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A102291 Total number of prime parts in all compositions of n. 10
0, 0, 1, 3, 7, 18, 42, 98, 222, 497, 1100, 2413, 5250, 11350, 24398, 52193, 111180, 235949, 499074, 1052502, 2213710, 4644833, 9724492, 20318637, 42376578, 88231765, 183420748, 380755932, 789340736, 1634339217, 3379993922, 6982618822, 14410499598, 29711523105 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
FORMULA
G.f.: Sum_{k>=1} x^prime(k)*(1-x)^2/(1-2*x)^2.
a(n) = Sum_{k=1..floor(n/2)} k * A224344(n,k). - Alois P. Heinz, Aug 06 2019
MAPLE
a:= proc(n) option remember; `if`(n=0, 0, add(a(n-j)+
`if`(isprime(j), ceil(2^(n-j-1)), 0), j=1..n))
end:
seq(a(n), n=0..33); # Alois P. Heinz, Aug 06 2019
MATHEMATICA
a[n_] := a[n] = If[n==0, 0, Sum[a[n-j] + If[PrimeQ[j], Ceiling[2^(n-j-1)], 0], {j, 1, n}]];
a /@ Range[0, 33] (* Jean-François Alcover, Oct 30 2020, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A356938 A208771 A036884 * A034691 A317546 A319001
KEYWORD
easy,nonn
AUTHOR
Vladeta Jovovic, Feb 19 2005
EXTENSIONS
More terms from Joshua Zucker, May 10 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 18 14:29 EDT 2024. Contains 374388 sequences. (Running on oeis4.)