posted by
emperor at 11:38am on 27/12/2005
Consider a piece of code that does:
ETA: I should mention (doh) that
It seems to me that given N and g you ought to be able to just calculate the resulting values of N and g, without having to iterate.
Alas, I am too stupid to see how. Can anyone help?
while(N>=g){
N=N-(g-1);
g=g-1;
}
ETA: I should mention (doh) that
g>3 and N<=(g)(g-1)(g-2)/6It seems to me that given N and g you ought to be able to just calculate the resulting values of N and g, without having to iterate.
Alas, I am too stupid to see how. Can anyone help?
There are 10 comments on this entry.