A164934 Number of different ways to select 3 disjoint subsets from {1..n} with equal element sum.
0, 0, 0, 0, 1, 3, 8, 22, 63, 157, 502, 1562, 4688, 15533, 50953, 165054, 562376, 1911007, 6467143, 22447463, 78021923, 271410289, 957082911, 3384587525, 11998851674, 42876440587, 153684701645, 552421854011, 1995875594696, 7231871165277, 26274832876337
Offset: 1
Keywords
Links
- Alois P. Heinz and Vaclav Kotesovec, Table of n, a(n) for n = 1..104 (first 65 terms from Alois P. Heinz)
Programs
-
Maple
b:= proc(n, k, i) option remember; local m; m:= i*(i+1)/2; if k>n then b(k, n, i) elif k>=0 and n+k>m or k<0 and n-2*k>m then 0 elif [n, k, i] = [0, 0, 0] then 1 else b(n, k, i-1)+b(n+i, k+i, i-1)+b(n-i, k, i-1)+b(n, k-i, i-1) fi end: a:= proc(n) option remember; `if`(n>2, b(n, n, n-1)/2+ a(n-1), 0) end: seq(a(n), n=1..20);
-
Mathematica
b[n_, k_, i_] := b[n, k, i] = Module[{m = i*(i+1)/2}, Which[k>n , b[k, n, i], k >= 0 && n+k>m || k<0 && n-2*k > m, 0, {n, k, i} == {0, 0, 0}, 1, True, b[n, k, i-1] + b[n+i, k+i, i-1] + b[n-i, k, i-1] + b[n, k-i, i-1]]]; a[n_] := a[n] = If[n>2, b[n, n, n-1]/2 + a[n-1], 0]; Table[a[n], {n, 1, 20}] (* Jean-François Alcover, Feb 05 2015, after Alois P. Heinz *)
Formula
Conjecture: a(n) ~ 4^n / (Pi * sqrt(3) * n^3). - Vaclav Kotesovec, Oct 16 2014
Comments