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!)
A144119 Total number of nonprime parts in all partitions of n. 5

%I #18 Oct 29 2015 08:04:42

%S 1,2,4,8,13,22,34,54,80,119,170,246,342,478,653,894,1198,1610,2127,

%T 2813,3672,4789,6181,7975,10192,13010,16488,20861,26224,32918,41086,

%U 51199,63494,78599,96888,119235,146167,178879,218181,265662,322487,390834,472343

%N Total number of nonprime parts in all partitions of n.

%C a(n) is also the sum of the differences between the sum of m-th largest and the sum of (m+1)st largest elements in all partitions of n for all nonprimes m. - _Omar E. Pol_, Oct 27 2012

%H Alois P. Heinz, <a href="/A144119/b144119.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A006128(n)-A037032(n).

%e From _Omar E. Pol_, Nov 20 2011 (Start):

%e For n = 6 we have:

%e --------------------------------------

%e . Number of

%e Partitions nonprime parts

%e --------------------------------------

%e 6 .......................... 1

%e 3 + 3 ...................... 0

%e 4 + 2 ...................... 1

%e 2 + 2 + 2 .................. 0

%e 5 + 1 ...................... 1

%e 3 + 2 + 1 .................. 1

%e 4 + 1 + 1 .................. 3

%e 2 + 2 + 1 + 1 .............. 2

%e 3 + 1 + 1 + 1 .............. 3

%e 2 + 1 + 1 + 1 + 1 .......... 4

%e 1 + 1 + 1 + 1 + 1 + 1 ...... 6

%e ------------------------------------

%e Total ..................... 22

%e So a(6) = 22. (End)

%p b:= proc(n, i) option remember; local g;

%p if n=0 then [1, 0]

%p elif i<1 then [0, 0]

%p else g:= `if`(i>n, [0$2], b(n-i, i));

%p b(n, i-1) +g +[0, `if`(isprime(i), 0, g[1])]

%p fi

%p end:

%p a:= n-> b(n, n)[2]:

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Oct 27 2012

%t b[n_, i_] := b[n, i] = Module[{g}, If[n == 0, {1, 0}, If[i<1, {0, 0}, g = If[i>n, {0, 0}, b[n-i, i]]; b[n, i-1] + g + {0, If[PrimeQ[i], 0, g[[1]]]} ]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Oct 29 2015, after _Alois P. Heinz_ *)

%o (PARI) vector(100, n, sum(k=1, n, (numdiv(k)-omega(k))*numbpart(n-k))) \\ _Altug Alkan_, Oct 29 2015

%Y Cf. A006128, A018252, A037032, A144116, A144121.

%K easy,nonn

%O 1,2

%A _Omar E. Pol_, Sep 11 2008

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 25 06:14 EDT 2024. Contains 371964 sequences. (Running on oeis4.)