Jump to content

Smarandache prime-digital sequence: Difference between revisions

m
Line 667:
smarandache = [2,3,5,7] <> s [2,3,5,7] >>= \x -> guard (isPrime x) >> [x]
where
f g = g >>= \x -> [x*10+2, x*10+3, x*10+5, x*10+7]
s xs = r <> s r where r = f xs
 
nextSPDSTerms :: [Int] -> [(String, String)]
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.