login
Number of partitions of 2n such that (sum of parts having multiplicity 1) = sum of all other parts.
5

%I #27 Oct 27 2023 21:51:29

%S 1,0,1,1,3,2,8,5,18,19,39,34,105,74,183,202,381,344,818,684,1459,1499,

%T 2662,2578,5279,4756,8835,9287,15655,15538,28319,27178,46709,49166,

%U 78303,80747,135134,134945,216255,231483,353557,369918,581337,600500,915010,987925

%N Number of partitions of 2n such that (sum of parts having multiplicity 1) = sum of all other parts.

%C The number of partitions of 2n+1 such that (sum of parts having multiplicity 1) = sum of all other parts is 0; see the Mathematica program at A240448 for related sequences.

%H Alois P. Heinz, <a href="/A240447/b240447.txt">Table of n, a(n) for n = 0..650</a> (first 64 terms from Manfred Scheucher)

%H Manfred Scheucher, <a href="/A240447/a240447.c.txt">C Code</a>

%e a(6) counts these 8 partitions of 12: 633, 6222, 62211, 6111111, 5331, 52221, 4332, 42111111 .

%p f := proc(L,p)

%p a := 0 ;

%p for i in L do

%p if i = p then

%p a := a+1 ;

%p end if;

%p end do:

%p a;

%p end proc:

%p sp1 := proc(L)

%p a1 :=0 ;

%p ao :=0 ;

%p for i in L do

%p if f(L,i) = 1 then

%p a1 := a1+i;

%p else

%p ao := ao+i;

%p end if;

%p end do:

%p if ( a1 = ao) then

%p true;

%p else

%p false;

%p end if;

%p end proc:

%p A240447 := proc(n)

%p a := 0 ;

%p for p in combinat[partition](2*n) do

%p if sp1(p) then

%p a := a+1 ;

%p end if;

%p end do:

%p a ;

%p end proc: # _R. J. Mathar_, Mar 06 2015

%p # second Maple program:

%p b:= proc(n, i, s) option remember; `if`(n=0, `if`(s=0, 1, 0),

%p `if`(i<1 or s>0 and i*(i+1)/2<s or abs(s)>n, 0,

%p add(b(n-i*j, i-1, s+`if`(j=1, -i, i*j)), j=0..n/i)))

%p end:

%p a:= n-> b(2*n$2, 0):

%p seq(a(n), n=0..70); # _Alois P. Heinz_, May 31 2015

%t ColumnForm[t = Table[Select[IntegerPartitions[n], 2 Total[First[Transpose[Select[#, Last[#] == 1 &] /. {} -> {{0, 0}}]]] &[Tally[#]] == n &], {n, 0, 30, 2}]] (* shows partitions *)

%t Map[Length, t] (* A240447 *) (* _Peter J. C. Moses_, Apr 02 2014 *)

%t b[n_, i_, s_] := b[n, i, s] = If[n == 0, If[s == 0, 1, 0], If[i<1 || s>0 && i*(i+1)/2 < s || Abs[s] > n, 0, Sum[b[n-i*j, i-1, s + If[j == 1, -i, i*j]], {j, 0, n/i}]]]; a[n_] := b[2*n, 2*n, 0]; Table[a[n], {n, 0, 70}] (* _Jean-François Alcover_, Oct 28 2015, after _Alois P. Heinz_ *)

%Y Cf. A240448, A240449, A240451, A240452.

%K nonn,easy

%O 0,5

%A _Clark Kimberling_, Apr 05 2014

%E More terms from _Manfred Scheucher_, May 30 2015