Mian-Chowla sequence: Difference between revisions

m
m (→‎{{header|REXX}}: optimized a compound statement.)
Line 779:
 
------------------- MIAN-CHOWLA SEQUENCE -----------------
 
mianChowlas :: Int -> [Int]
mianChowlas =
Line 788 ⟶ 787:
(foldr insert sumSet ((2 * m) : fmap (m +) mcs), m : mcs)
where
valid x = all (not .$ any (flip member sumSet . (x +)) mcs
m = until valid succ n
 
9,655

edits