úÎOLL=      !"#$%&'()*+,-./0123456789:;<@Data structure for storing an OEIS entry. For more information  on the various components, see   9http://www.research.att.com/~njas/sequences/eishelp2.html. -Catalog number(s), e.g. A000040, N1425. (%I) nThe actual sequence data (or absolute values of the sequence data in the case of signed sequences). (%S,T,U) PSigned sequence data (empty for sequences with all positive entries). (%V,W,X) (Short description of the sequence. (%N) "List of academic references. (%D) 3List of links to more information on the web. (%H) 3Formulas or equations involving the sequence. (%F) *Cross-references to other sequences. (%Y) 6Author who input the sequence into the database. (%A)  Subscript/index of the first term. (%O) Index of the first term > 1. (%O) 9Code that can be used to generate the sequence. (%p,t,o) (Corrections, extensions, or edits. (%E) Examples. (%e) Keywords. (%K) Comments. (%C) <OEIS keywords. For more information on the meaning of each  keyword, see   <http://www.research.att.com/~njas/sequences/eishelp2.html#RK. .@Programming language that some code to generate the sequence is @ written in. The only languages indicated natively by the OEIS A database are Mathematica and Maple; any other languages will be E listed (usually in parentheses) at the beginning of the actual code  snippet. 3HInterpret a string as a OEIS request, and return the results as Strings 49Look up a sequence in the OEIS using its search function 5ALook up a sequence in the OEIS by its catalog number. Generally 5 this would be its A-number, but M-numbers (from the /Encyclopedia of  Integer Sequences) and N-numbers (from the Handbook of Integer  Sequences/) can be used as well. #Note that the result is not in the = monad, even though the 8 implementation requires looking up information via the = Internet. There are no side effects to speak of, and from a C practical point of view the function is referentially transparent / (OEIS A-numbers could change in theory, but it' s extremely  unlikely). If you'+re a nitpicky purist, feel free to use the  provided 6 instead.  Examples: F Prelude Math.OEIS> getSequenceByID "A000040" -- the prime numbers 3 Just [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47...  F Prelude Math.OEIS> getSequenceByID "A-1" -- no such sequence!  Nothing 6 The same as 5, but with a result in the =  monad. 7<Look up a sequence by ID number, returning a data structure @ containing the entirety of the information the OEIS has on the  sequence. /The standard disclaimer about not being in the = monad applies.  Examples: D Prelude Math.OEIS> description `fmap` lookupSequenceByID "A000040"  Just "The prime numbers."  A Prelude Math.OEIS> keywords `fmap` lookupSequenceByID "A000105"  Just [Nonn,Hard,Nice,Core] 8 The same as 7 , but in the = monad. 9>Extend a sequence by using it as a lookup to the OEIS, taking B the first sequence returned as a result, and using it to augment  the original sequence.  Note that xs! is guaranteed to be a prefix of extendSequence xs. C If the matched OEIS sequence contains any elements prior to those  matching xs5, they will be dropped. In addition, if no matching  sequences are found, xs will be returned unchanged. The result is not in the =& monad even though the implementation A requires looking up information via the Internet. There are no 9 side effects, and practically speaking this function is A referentially transparent (technically, results may change from B time to time when the OEIS database is updated; this is slightly ! more likely than the results of 5 changing, but still D unlikely enough to be essentially a non-issue. Again, purists may  use :).  Examples:  2 Prelude Math.OEIS> extendSequence [5,7,11,13,17] 9 [5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71...  1 Prelude Math.OEIS> extendSequence [2,4,8,16,32] 4 [2,4,8,16,32,64,128,256,512,1024,2048,4096,8192... G Prelude Math.OEIS> extendSequence [9,8,7,41,562] -- nothing matches  [9,8,7,41,562] : The same as 9 , but in the = monad. ;@Find a matching sequence in the OEIS database, returning a data C structure containing the entirety of the information the OEIS has  on the sequence. /The standard disclaimer about not being in the = monad applies. < The same as ; , but in the = monad. > extend xs ext returns the maximal suffix of ext of which xs is  a prefix, or xs if xs$ is not a prefix of any suffixes of ext. It  is guaranteed that 0 forall xs ext. xs `isPrefixOf` (extend xs ext) =  !"#$%&'()*+,-./0123456789:;<=579;68:<432./01 !"#$%&'()*+,- ?      !"#$%&'()*+,-./0123456789:;<=>?@ABCDoeis-0.2 Math.OEISbase System.IO OEISSequenceOEIS catalogNums sequenceData signedData description referenceslinksformulasxrefsauthoroffsetfirstGT1programs extensionsexampleskeywordscommentsKeywordWordWalkUnknUnedTablTabfSignObscNonnNiceNewMultMoreHardFullFracFiniEigenEasyDupeDumbDeadCoreConsCofrBrefBaseLanguageOtherMaple Mathematica SequenceData lookupOEISsearchSequence_IOgetSequenceByIDgetSequenceByID_IOlookupSequenceByIDlookupSequenceByID_IOextendSequenceextendSequence_IOlookupSequencelookupSequence_IO GHC.IOBaseIOextend