! Copyright (c) 2008 Eric Mertens ! See http://factorcode.org/license.txt for BSD license. USING: kernel math sequences locals ; IN: project-euler.150 :: (euler150) ( m -- n ) [let | table [ sums-triangle ] | m [| x | x 1+ [| y | m x - [| z | x z + table nth [ y z + 1+ swap nth ] [ y swap nth ] bi - ] map partial-sums infimum ] map-infimum ] map-infimum ] ; : euler150 ( -- n ) 1000 (euler150) ;