simplyfied sum formula repetition in recursive sum