Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Total number of repeated parts in all partitions of n.
5

%I #46 Jun 12 2024 12:24:37

%S 0,0,2,3,8,12,24,35,60,87,136,192,287,396,567,773,1074,1439,1958,2587,

%T 3454,4514,5931,7666,9951,12736,16341,20743,26354,33184,41807,52262,

%U 65329,81144,100721,124344,153390,188303,230940,282063,344100,418242,507762

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

%H Alois P. Heinz, <a href="/A194452/b194452.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = A006128(n) - A024786(n+1).

%F a(n) = Sum_{k=2..n} k*A264405(n,k). - _Alois P. Heinz_, Dec 07 2015

%F G.f.: g = Sum_{j>0} (x^{2*j}*(2 - x^j)/(1-x^j))/Product_{k>0}(1 - x^k) (obtained by logarithmic differentiation of the bivariate g.f. given in A264405). - _Emeric Deutsch_, Feb 02 2016

%e For n = 6 we have:

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

%e . Number of

%e Partitions repeated parts

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

%e 6 .......................... 0

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

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

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

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

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

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

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

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

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

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

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

%e Total ..................... 24

%e So a(6) = 24.

%p b:= proc(n, i) option remember; local h, j, t;

%p if n<0 then [0, 0]

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

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

%p else h:= [0, 0];

%p for j from 0 to iquo(n, i) do

%p t:= b(n-i*j, i-1);

%p h:= [h[1]+t[1], h[2]+t[2]+`if`(j<2, 0, t[1]*j)]

%p od; h

%p fi

%p end:

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

%p seq(a(n), n=0..50); # _Alois P. Heinz_, Nov 20 2011

%p g := add(x^(2*j)*(2-x^j)/(1-x^j), j = 1 .. 80)/mul(1-x^j, j = 1 .. 80): gser := series(g, x = 0, 50): seq(coeff(gser, x, n), n = 0 .. 45); # _Emeric Deutsch_, Feb 02 2016

%t myCount[p_List] := Module[{t}, If[p == {}, 0, t = Transpose[Tally[p]][[2]]; Sum[If[t[[i]] == 1, 0, t[[i]]], {i, Length[t]}]]]; Table[Total[Table[myCount[p], {p, IntegerPartitions[i]}]], {i, 0, 20}] (* _T. D. Noe_, Nov 19 2011 *)

%t b[n_, i_] := b[n, i] = Module[{h, j, t}, Which[n<0, {0, 0}, n==0, {1, 0}, i < 1, {0, 0}, True, h={0, 0}; For[j=0, j <= Quotient[n, i], j++, t = b[n - i*j, i-1]; h = {h[[1]]+t[[1]], h[[2]]+t[[2]] + If[j<2, 0, t[[1]]*j]}]; h] ]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Oct 25 2015, after _Alois P. Heinz_ *)

%t Table[Length[Flatten[Select[Flatten[Split[#]&/@IntegerPartitions[n],1],Length[#]>1&]]],{n,0,60}] (* _Harvey P. Dale_, Jun 12 2024 *)

%Y Cf. A006128, A024786, A047967, A135010, A138121, A194544, A264405.

%K nonn

%O 0,3

%A _Omar E. Pol_, Nov 19 2011