A185350 Number of parts in all partitions of n in which no part occurs more than twice.
0, 1, 3, 3, 8, 11, 17, 23, 36, 48, 69, 88, 125, 157, 212, 271, 356, 445, 574, 711, 906, 1118, 1400, 1711, 2125, 2583, 3171, 3828, 4666, 5604, 6777, 8095, 9730, 11567, 13815, 16357, 19429, 22910, 27077, 31801, 37432, 43802, 51338, 59871, 69914, 81273, 94562
Offset: 0
Keywords
Examples
a(6) = 17: [6], [5,1], [4,2], [3,3], [4,1,1], [3,2,1], [2,2,1,1]. a(7) = 23: [7], [6,1], [5,2], [4,3], [5,1,1], [4,2,1], [3,3,1], [3,2,2], [3,2,1,1].
Links
- Vaclav Kotesovec, Table of n, a(n) for n = 0..11410 (terms 0..1000 from Alois P. Heinz)
Programs
-
Maple
b:= proc(n, i) option remember; `if`(n=0, [1, 0], `if`(i<1, [0, 0], add((l->[l[1], l[2]+l[1]*j])(b(n-i*j, i-1)), j=0..min(n/i, 2)))) end: a:= n-> b(n, n)[2]: seq(a(n), n=0..50);
-
Mathematica
b[n_, i_, k_] := b[n, i, k] = If[n==0, {1, 0}, If[i<1, {0, 0}, Sum[b[n - i j, i - 1, k] /. l_List :> {l[[1]], l[[2]] + l[[1]] j}, {j, 0, Min[n/i, k]} ] ] ]; a[n_] := b[n, n, 2][[2]]; a /@ Range[0, 50] (* Jean-François Alcover, Dec 10 2020, after Alois P. Heinz *) Table[Length[Flatten[Select[IntegerPartitions[n],Max[Length/@Split[#]]<3&]]],{n,0,50}] (* Harvey P. Dale, Jul 04 2023 *)
Formula
a(n) = Sum_{k>=0} k*A209318(n,k).
a(n) ~ log(3) * exp(2*Pi*sqrt(n)/3) / (2*Pi*n^(1/4)). - Vaclav Kotesovec, May 26 2018