[seqfan] Re: submitting a program, while preserving preformatted text

Georgi Guninski guninski at guninski.com
Sun Sep 5 13:21:13 CEST 2010

i second this.

in addition this will greatly improve machine analysis of nondumb

submit a B-file with at least 1000 terms. reading from a file is much
faster than computing slow sequences (especially if the analysis is run
multiple times).

if the B-file is rather large (say the sequence is double exponential,
the terms may be reduced modulo (agreed) prime of modest size) - this will work for my
analysis and may require a comment in the B-file.

regarding the database of pari code, i managed to parse some
 OEIS pari programs (using heuristic to clean non-code).

sage: ke=aka.keys()
sage: len(ke)
sage: k=ke[100];(k,aka[k])
('A086823', '  a(n) = polcoeff(polcyclo(n), 2); \n')

On Sun, Sep 05, 2010 at 12:49:34PM +0200, Richard Mathar wrote:
> Back to http://list.seqfan.eu/pipermail/seqfan/2010-September/005944.html
> There is the formatting standard to replace spaces or tabs by dots
> to preserve the Python (which of course includes SAGE) indentation.
> See the "Python examples, sequences related to" in http://oeis.org/classic/Sindx_Ps.html.
> I would strongly suggest to follow a discipline of naming the functions
> according the A-numbers they compute so (i) we can build a library of OEIS
> functions in Maple, Mma, Python, Java, C/C++, perl, Pari/gp in the future,
> and (ii) a search for the Axxxx returns the piece of code wherever it is
> used.
> So Axxxxx(n) returns the value at index n, isAxxxxx(n) tests the value against
> being in the sequence, Axxxxx_list(n) returns the first n values, Axxxx_row(n)
> returns the n-th row in an array or triangle, Axxxx(n,k) returns the value
> in row n, column k.
> (I am aware of the fact that recommendations of that kind have been made in
> the past, and I am only one out of two contributors who have adopted such a
> strategy in submissions of Maple, pari and python.):
> http://www.strw.leidenuniv.nl/~mathar/progs/pdocs/oeis_core.html
> I am using tabs for indentation (for all the standard reasons), then piping the
> source code through a bash script (here the same as the corresponding
> ksh or csh or tcsh) before pasting it into the OEIS submission form :
> #!/bin/bash
> # usage:
> #  py2oeis < file.in
> sed 's/\t/.../g' | awk '{ printf "%s\\Q\n",$0}'
> _______________________________________________
> Seqfan Mailing list - http://list.seqfan.eu/

More information about the SeqFan mailing list