September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -1,9 +1,14 @@
|
|||
import Data.List
|
||||
import Data.List (elemIndex)
|
||||
|
||||
sb = 1:1: f (tail sb) sb where
|
||||
f (a:aa) (b:bb) = a+b : a : f aa bb
|
||||
sb :: [Int]
|
||||
sb = 1 : 1 : f (tail sb) sb
|
||||
where
|
||||
f (a:aa) (b:bb) = a + b : a : f aa bb
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
print $ take 15 sb
|
||||
print [(i,1 + (\(Just i)->i) (elemIndex i sb)) | i <- [1..10]++[100]]
|
||||
print $ all (\(a,b)->1 == gcd a b) $ take 1000 $ zip sb (tail sb)
|
||||
print $ take 15 sb
|
||||
print
|
||||
[ (i, 1 + (\(Just i) -> i) (elemIndex i sb))
|
||||
| i <- [1 .. 10] ++ [100] ]
|
||||
print $ all (\(a, b) -> 1 == gcd a b) $ take 1000 $ zip sb (tail sb)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue