func f(n) is cached { return 2 if (n == 1) lpf(1 + prod(1..^n, {|k| f(k) })) } say f.map(1..16) say f.map(17..27)