OFFSET
1,1
COMMENTS
If the urn contains 596 balls, there exist two inequivalent combinations with the desired property, {86, 246, 264} and {126, 154, 316}.
The analogous sequence for two colors are the square numbers > 1 (A000290 with first two terms truncated).
EXAMPLE
46 is a member of the sequence because if the urn contains 6 red, 18 green and 22 blue balls, then there are 6 * 18 * 22 = 2376 selections of three balls with distinct colors, and ((6 * 5 * 4) + (18 * 17 * 16) + (22 * 21 * 20)) / 3! = 2376 selections of three balls all the same color, and 6 + 18 + 22 = 46.
PROG
(Pascal) program a228650;
var
p: array[1..6000] of int64;
b1, b2, b3, k: int64;
n, s: integer;
begin
k:=0;
repeat
inc(k);
p[k] := (k * (k - 1) * (k - 2)) div 6;
until k = 6000;
n := 0; k := 2;
repeat
inc(k); s := 0;
b1 := 0;
repeat
inc(b1);
b2 := b1 - 1;
b3 := k - (b1 + b2);
repeat
inc(b2); dec(b3);
if (b3 >= b2) and (b1 * b2 * b3 = p[b1] + p[b2] + p[b3]) then
begin
inc(n); inc(s);
writeln(n, ' ', k);
end;
until (b3 <= b2) or (s > 0);
until (3 * b1 >= k) or (s > 0);
until k = 6000;
end.
CROSSREFS
KEYWORD
nonn
AUTHOR
William Rex Marshall, Aug 29 2013
STATUS
approved