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!)
A326958 Total sum of noncomposite parts in all partitions of n. 2
0, 1, 4, 9, 16, 31, 52, 87, 132, 203, 303, 450, 641, 922, 1287, 1792, 2446, 3347, 4488, 6030, 7975, 10538, 13778, 17987, 23234, 29980, 38383, 49015, 62195, 78766, 99137, 124560, 155672, 194158, 241104, 298780, 368747, 454276, 557619, 683132, 834252, 1016955 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) = A073118(n) + A000070(n-1), n >= 1.
a(n) = A066186(n) - A326982(n).
EXAMPLE
For n = 6 we have:
--------------------------------------
. Sum of
Partitions noncomposite
of 6 parts
--------------------------------------
6 .......................... 0
3 + 3 ...................... 6
4 + 2 ...................... 2
2 + 2 + 2 .................. 6
5 + 1 ...................... 6
3 + 2 + 1 .................. 6
4 + 1 + 1 .................. 2
2 + 2 + 1 + 1 .............. 6
3 + 1 + 1 + 1 .............. 6
2 + 1 + 1 + 1 + 1 .......... 6
1 + 1 + 1 + 1 + 1 + 1 ...... 6
------------------------------------
Total ..................... 52
So a(6) = 52.
MAPLE
b:= proc(n, i) option remember; `if`(n=0 or i=1, [1, n], b(n, i-1)+
(p-> p+[0, `if`(isprime(i), p[1]*i, 0)])(b(n-i, min(n-i, i))))
end:
a:= n-> b(n$2)[2]:
seq(a(n), n=0..50); # Alois P. Heinz, Aug 13 2019
MATHEMATICA
b[n_, i_] := b[n, i] = If[n==0 || i==1, {1, n}, b[n, i-1] + # + {0, If[PrimeQ[i], #[[1]] i, 0]}&[b[n-i, Min[n-i, i]]]];
a[n_] := b[n, n][[2]];
a /@ Range[0, 50] (* Jean-François Alcover, Nov 17 2020, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A093175 A138992 A199936 * A281904 A007679 A239870
KEYWORD
nonn
AUTHOR
Omar E. Pol, Aug 08 2019
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 April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)