> My son said that one of the students arrived at the correct answer of 61 > without a computer. I can't believe this given the time it would require to > go through the answer space via pencil and paper (28^3). Is there a closed > form solution, or algebraic solution?
Yes, there is. All in all, it was quite easy to find but the corr-ection factor that depends on the parities of zmin and zmax. Enjoy: tricnt =: 3 : 0 zmin =. 1+>.y%3 zmax =. -<.1-y%2 sumz =. zmin+zmax corr =. (_1)^(1-2|zmin)*(1-2|sumz) (_1r4*corr) + (1+zmax-zmin) * (-(y+1)%2) + (3*sumz%4) - 1r4 ) Not being confident yet with J syntax, the last line is overfull of parentheses. Sorry about this. Regards. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
