for(int i=0; i < Level; i++) { Blockamount = Blockamount + ((((Level*2)-(i*2+1))*((Level*2)-(i*2+1)))*(i+1)); } Basically, I want to shorten this function into a formula. I just don't know how. It is also...