function out = getProbabilities(n, howMany, decimals)

thres_giant = 1/(n-1);
thres_conn = log(n)/n;

size = [ floor(howMany/3)+1 ceil(howMany/3)+1 round(howMany/3)+1 ];

p1 = linspace(0, thres_giant, size(1));
p2 = linspace(thres_giant, thres_conn, size(2));
p3 = linspace(thres_conn, 2*thres_conn, size(3));

out = [ p1(2:size(1)) p2(2:size(2)) p3(2:size(3)) ];
if (n > 2*10^decimals+1)
    warning('thres_giant would round to zero; using ceil instead.');
    out = ceil(out * 10^decimals) * 10^-decimals;
else
    out = round(out * 10^decimals) * 10^-decimals;
end

end