
Carl Witty wrote:
On Mon, 2007-10-22 at 10:54 -0400, Brent Yorgey wrote: The Online Encyclopedia of Integer Sequences should really contain more Haskell code for describing the sequences.
Agreed! I propose an "OEIS party" where we all sit around one day and submit Haskell code. =)
(I'm only half joking...)
See http://www.sagemath.org/hg/sage-main/file/cf44d55e626b/sage/combinat/sloane_... for the very beginnings of an effort to write OEIS code in Python (for the SAGE computer algebra system). (It looks like currently 130 sequences are implemented.) Maybe this would be useful as a starting point.
This is a bit of a waste of human time, especially since automated methods (like gfun [1]) can automatically find closed-forms for about 1/3 of the sequences on OEIS. Generating code from the output of gfun is an easy task, and leads to rather pretty results [2], in my completely biased opinion. Very very few of the sequences outside of that 1/3 has known "programs" associated with them. Now, using many of Jerzy Karczmarczuk's ideas [3] and Haskell packages, one could rewrite gfun in Haskell, and the end result would likely be extremely elegant, although making it efficient might be rather more challenging. Jacques [1] http://portal.acm.org/citation.cfm?id=178368 and http://algo.inria.fr/libraries/ [2] http://www.cas.mcmaster.ca/~carette/publications/CaretteJanicki.pdf [3] http://users.info.unicaen.fr/~karczma/arpap/