cp's OEIS Frontend

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.

A326958 Total sum of noncomposite parts in all partitions of n.

This page as a plain text file.
%I A326958 #22 Nov 17 2020 04:43:44
%S A326958 0,1,4,9,16,31,52,87,132,203,303,450,641,922,1287,1792,2446,3347,4488,
%T A326958 6030,7975,10538,13778,17987,23234,29980,38383,49015,62195,78766,
%U A326958 99137,124560,155672,194158,241104,298780,368747,454276,557619,683132,834252,1016955
%N A326958 Total sum of noncomposite parts in all partitions of n.
%F A326958 a(n) = A073118(n) + A000070(n-1), n >= 1.
%F A326958 a(n) = A066186(n) - A326982(n).
%e A326958 For n = 6 we have:
%e A326958 --------------------------------------
%e A326958 .                         Sum of
%e A326958 Partitions             noncomposite
%e A326958 of 6                       parts
%e A326958 --------------------------------------
%e A326958 6 .......................... 0
%e A326958 3 + 3 ...................... 6
%e A326958 4 + 2 ...................... 2
%e A326958 2 + 2 + 2 .................. 6
%e A326958 5 + 1 ...................... 6
%e A326958 3 + 2 + 1 .................. 6
%e A326958 4 + 1 + 1 .................. 2
%e A326958 2 + 2 + 1 + 1 .............. 6
%e A326958 3 + 1 + 1 + 1 .............. 6
%e A326958 2 + 1 + 1 + 1 + 1 .......... 6
%e A326958 1 + 1 + 1 + 1 + 1 + 1 ...... 6
%e A326958 ------------------------------------
%e A326958 Total ..................... 52
%e A326958 So a(6) = 52.
%p A326958 b:= proc(n, i) option remember; `if`(n=0 or i=1, [1, n], b(n, i-1)+
%p A326958       (p-> p+[0, `if`(isprime(i), p[1]*i, 0)])(b(n-i, min(n-i, i))))
%p A326958     end:
%p A326958 a:= n-> b(n$2)[2]:
%p A326958 seq(a(n), n=0..50);  # _Alois P. Heinz_, Aug 13 2019
%t A326958 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]]]];
%t A326958 a[n_] := b[n, n][[2]];
%t A326958 a /@ Range[0, 50] (* _Jean-François Alcover_, Nov 17 2020, after _Alois P. Heinz_ *)
%Y A326958 Cf. A000041, A000070, A008578 (noncomposites), A066186, A073118, A194545, A199936, A326957, A326982.
%K A326958 nonn
%O A326958 0,3
%A A326958 _Omar E. Pol_, Aug 08 2019