%I #31 Aug 25 2019 06:07:15
%S 0,0,2,8,22,48,98,178,316,524,856,1334,2066,3084,4578,6626,9530,13434,
%T 18854,26022,35764,48520,65526,87550,116536,153674,201906,263258,
%U 342006,441366,567754,726032,925588,1174010,1484664,1869072,2346586,2934044
%N Number of one-element transitions among partitions of the integer n for labeled parts.
%H Vaclav Kotesovec, <a href="/A094533/b094533.txt">Table of n, a(n) for n = 0..10000</a> (terms 0..1000 from Alois P. Heinz)
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/q-PolygammaFunction.html">q-Polygamma Function</a>, <a href="http://mathworld.wolfram.com/q-PochhammerSymbol.html">q-Pochhammer Symbol</a>
%F a(n) = Sum_p=1^P(n) Sum_i=1^D(p) Sum_j=i^D(p) 1 [subject to: d(i, p) <= d(j, p) ]; P(n) = number of partitions of n, D(p) = number of digits in partition p, d(i, p) and d(j, p) = digits number i and j in partition p of integer n.
%F a(n) = Sum_i=1^P(n) p(i, n)^2 - p(i, n), where P(n) is the number of integer partitions of n and p(i, n) is the number of parts of the i-th partition of n.
%F G.f.: (log(1-x)^2 - log(1-x)*log(x) + psi_x(1)*(2*log(1-x) - log(x) + psi_x(1)) + psi^1_x(1))/((x; x)_inf * log(x)^2), where psi_q(z) is the q-digamma function, psi^1_q(z) is the q-trigamma function, and (a; q)_inf is the q-Pochhammer symbol (the Euler function). To get this g.f., take the derivative (d/da)^2 (x^2/(a; x)_inf) and let a = x. - _Vladimir Reshetnikov_, Nov 21 2016
%e In the labeled case we have 22 one-element transitions among all partitions of n=4:
%e [1,1,1,1] -> [1,1,2] arises 6 times (the first 1 added to the second 1 gives 2,
%e the first 1 added to the third 1 gives 2, the first 1 added to the fourth 1 gives 2, the second 1 added to the third 1 gives 2, the second 1 added to the fourth 1 gives 2, the third 1 added to the fourth 1 gives 2),
%e [1,1,2] -> [2,2] arises 1 times,
%e [1,1,2] -> [1,3] arises 2 times,
%e [2,2] -> [1,3] arises 1 times,
%e [1,3] -> [4] arises 1 time,
%e which gives 11 upwards transitions and 22 transitions in total if we include downwards transitions.
%e n=4: partition number p=1 is [1,1,1,1],
%e digits d(1,1)=1, d(2,1)=1 contribute 1,
%e digits d(1,1)=1, d(3,1)=1 contribute 1,
%e etc...
%e digits d(3,1)=1, d(4,1)=1 contribute 1,
%e (in total 6 contributions by [1,1,1,1]);
%e partition number p=2 is [1,1,2],
%e digits d(1,2)=1, d(2,2)=1 contribute 1,
%e digits d(1,2)=1, d(3,2)=2 contribute 1,
%e digits d(2,2)=1, d(3,2)=2 contribute 1;
%e partition number p=3 is [2,2],
%e digits d(1,3)=2, d(2,3)=2 contribute 1;
%e partition number p=4 is [1,3],
%e digits d(1,4)=1, d(2,4)=3 contribute 1;
%e partition number p=5 is [4],
%e digit d(1,5)=4 contributes 0;
%p main := proc(n::integer) local a,ndxp,ListOfPartitions,APartition,PartOfAPartition; with(combinat): ListOfPartitions:=partition(n); a:=0; for ndxp from 1 to nops(ListOfPartitions) do APartition := ListOfPartitions[ndxp]; a := a + nops(APartition)^2 - nops(APartition); end do; print("n, a(n):",n,a); end proc;
%p # second Maple program:
%p b:= proc(n, i) option remember; local f, g;
%p if n=0 then [1, [1]] elif i<1 then [0, [0]]
%p else f:= b(n, i-1); g:= `if`(i>n, [0, [0]], b(n-i, i));
%p [f[1]+g[1], zip((x, y)-> x+y, f[2], [0, g[2][]], 0)]
%p fi
%p end:
%p a:= n-> (l-> add(l[t+1]*t*(t-1), t=1..nops(l)-1))(b(n$2)[2]):
%p seq(a(n), n=0..50); # _Alois P. Heinz_, Apr 05 2012
%t a[n_] := Block[{p = IntegerPartitions[n], l = PartitionsP[n]}, Sum[ Length[p[[k]]]^2 - Length[p[[k]]], {k, l}]]; Table[ a[n], {n, 0, 37}] (* _Robert G. Wilson v_, Jul 13 2004, updated by _Jean-François Alcover_, Jan 29 2014 *)
%t Simplify@Table[SeriesCoefficient[(Log[1 - x]^2 - Log[1 - x] Log[x] + QPolyGamma[1, x] (2 Log[1 - x] - Log[x] + QPolyGamma[1, x]) + QPolyGamma[1, 1, x])/(QPochhammer[x] Log[x]^2), {x, 0, n}], {n, 0, 40}] (* _Vladimir Reshetnikov_, Nov 21 2016 *)
%t Simplify@Table[SeriesCoefficient[2 q^2/QPochhammer[q + a, q], {a, 0, 2}, {q, 0, n}], {n, 0, 40}] (* _Vladimir Reshetnikov_, Nov 22 2016 *)
%Y Cf. A093695.
%K nonn
%O 0,3
%A _Thomas Wieder_, Jun 05 2004
%E More terms from _Robert G. Wilson v_, Jul 13 2004
|