solved 181 in gp with generating function. go approach is too slow