| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Math.OEIS
Synopsis
- searchSeq :: SearchStatus -> Int -> Vector OEISSeq
- searchSeq' :: SearchStatus -> Int -> IO (Vector OEISSeq)
- lookupSeq :: SearchStatus -> Maybe OEISSeq
- lookupSeq' :: SearchStatus -> IO (Maybe OEISSeq)
- getSeqData :: SearchStatus -> Maybe SeqData
- getSeqData' :: SearchStatus -> IO (Maybe SeqData)
- extendSeq :: SeqData -> SeqData
- extendSeq' :: [Integer] -> IO [Integer]
- type SeqData = [Integer]
- data SearchStatus
- data Keyword
- data OEISSeq = OEIS {
- number :: Text
- ids :: Texts
- seqData :: SeqData
- name :: Text
- comment :: Texts
- reference :: Texts
- link :: Texts
- formula :: Texts
- example :: Texts
- maple :: Texts
- mathematica :: Texts
- program :: [Program]
- xref :: Texts
- keyword :: [Keyword]
- offset :: Integer
- author :: Text
- ext :: Texts
- references :: Integer
- revision :: Integer
- time :: Text
- created :: Text
Functions
searchSeq :: SearchStatus -> Int -> Vector OEISSeq Source #
Get all search results on OEIS
e.g.
ghci>searchSeq (ID "A000027") 0
[OEIS {number = "A000027", ids = ["M0472","N0173"], seqData = [1,2,3,4,5,6,7,...ghci>searchSeq (SubSeq [1,2,3,4]) 0
[OEIS {number = "A000027", ids = ["M0472","N0173"], seqData = [1,2,3,4,5,6,7,...
ghci>length it
53
ghci>searchSeq (SubSeq [1,2,3,4]) 17
[OEIS {number = "A000027", ids = ["M0472","N0173"], seqData = [1,2,3,4,5,6,7,8,9,
ghci>length it
17ghci>searchSeq (SubSeq [1,1,4,5,1,4,1,9,1,9,8,9,3]) 0 []
searchSeq' :: SearchStatus -> Int -> IO (Vector OEISSeq) Source #
searchSeq in IO
lookupSeq :: SearchStatus -> Maybe OEISSeq Source #
Look up a sequence on OEIS.
e.g.
ghci>lookupSeq (ID "A000027")
Just (OEIS {number = "A000027", ids = ["M0472","N0173"], seqData = [1,2,3,4,5,6,7,...ghci>lookupSeq (SubSeq [1,2,3,4])
Just (OEIS {number = "A000027", ids = ["M0472","N0173"], seqData = [1,2,3,4,5,6,7,...lookupSeq' :: SearchStatus -> IO (Maybe OEISSeq) Source #
lookupSeq in IO
getSeqData :: SearchStatus -> Maybe SeqData Source #
Get sub-sequence on OEIS.
e.g.
ghci>getSeqData (ID "A000027") Just [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77]
ghci>getSeqData (SubSeq [1,2,3,4]) Just [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77]
getSeqData' :: SearchStatus -> IO (Maybe SeqData) Source #
getSeqData in IO
extendSeq :: SeqData -> SeqData Source #
Extend from sub-sequence.
e.g.
ghci>extendSeq [1,2,3,4] [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77]
ghci> extendSeq [1,3,2,5,6,1,6] [1,3,2,5,6,1,6]
Types
data SearchStatus Source #
Constructors
Instances
| Show SearchStatus Source # | |
Defined in Math.OEIS.Types Methods showsPrec :: Int -> SearchStatus -> ShowS # show :: SearchStatus -> String # showList :: [SearchStatus] -> ShowS # | |
| Eq SearchStatus Source # | |
Defined in Math.OEIS.Types | |
Constructors
| Base | |
| Bref | |
| Changed | |
| Cofr | |
| Cons | |
| Core | |
| Dead | |
| Dumb | |
| Dupe | |
| Easy | |
| Eigen | |
| Fini | |
| Frac | |
| Full | |
| Hard | |
| More | |
| Mult | |
| New | |
| Nice | |
| Nonn | |
| Obsc | |
| Sign | |
| Tabf | |
| Tabl | |
| Uned | |
| Unkn | |
| Walk | |
| Word | |
| Look | |
| Other |
Constructors
| OEIS | |
Fields
| |