login
Number of numbers between min(p) and max(p) that are not parts of the partition p, summed over all partitions of n.
2

%I #10 Dec 22 2016 12:01:30

%S 0,0,0,1,3,7,14,25,42,68,105,158,233,337,476,669,922,1262,1704,2288,

%T 3036,4015,5251,6846,8851,11408,14590,18614,23591,29824,37492,47018,

%U 58670,73050,90543,111995,137982,169652,207848,254156,309784,376892,457200,553640,668643,806174,969613,1164309,1394960,1668709

%N Number of numbers between min(p) and max(p) that are not parts of the partition p, summed over all partitions of n.

%C a(n) = Sum_{k>=0} k*A240185(n,k).

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

%F G.f.: g(x) = Sum_{i>=1} Sum_{j>=i+2} x^{i+j} * Sum_{k=i+1..j-1} (1-x^k) /((1-x^i)*(1-x^j)*Product_{k=i+1..j-1} (1-x^k)).

%e a(5) = 3 because for the partitions p = [5], [4,1], [3,2], [3,1,1], [2,2,1], [2,1,1,1], [1,1,1,1,1] the sets of numbers between min(p) and max(p) that are not parts of the partition p are: empty, {2,3}, empty, {2}, empty, empty, empty.

%p g := add(add(x^(i+j)*add(1-x^k, k = i+1 .. j-1)/((1-x^i)*(1-x^j)*mul(1-x^k, k = i+1 .. j-1)), j = i+2 .. 80), i = 1 .. 80): gser := series(g, x = 0, 55): seq(coeff(gser, x, n), n = 1 .. 50);

%p # second Maple program:

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

%p `if`(t, [1, 0], [0$2]), [0$2])+ `if`(i>1, (p-> p+

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

%p b(n-i*j, i-1, true), j=1..(n-1)/i), 0)

%p end:

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

%p seq(a(n), n=1..50); # _Alois P. Heinz_, Dec 30 2015

%t b[n_, i_, t_] := b[n, i, t] = If[Mod[n, i] == 0, If[t, {1, 0}, {0, 0}], {0, 0}] + If[i > 1, Function[p, p + If[t, {0, p[[1]]}, 0]][b[n, i - 1, t]] + Sum[b[n - i*j, i - 1, True], {j, 1, (n - 1)/i}], 0]; a[n_] := b[n, n, False][[2]]; Table[a[n], {n, 1, 50}] (* _Jean-François Alcover_, Dec 22 2016, after _Alois P. Heinz_ *)

%Y Cf. A240185.

%K nonn

%O 1,5

%A _Emeric Deutsch_, Dec 30 2015