add memo to euler 74