Request for more Python programs
Alec Mihailovs
alec at mihailovs.com
Tue Jan 2 00:13:17 CET 2007
From: "N. J. A. Sloane" <njas at research.att.com>
>
> Dear Seqfans, There are very few Python programs in the OEIS.
> I would like to get more - even for the simplest sequences,
> and especially for all the important sequences, whenever appropriate.
I certainly agree. For a long time, I used Maple primarily. Last year, I
switched to Mathematica - and it had its pluses and minuses, comparing to
Maple, but my overall impression is that Mathematica is neater, faster, and
less buggy. However, recently, influenced by SAGE, I started doing most of
my mathematical programming in Python - and it works much better than in
both Maple and Mathematica - clean coding, easy to use and maintain, fast,
etc.
Here is the Python program for A010892,
%o A010892 # Python program from Alec Mihailovs, January 1 2007.
%o A010892 def A010892(n): [1,1,0,-1,-1,0][n%6]
Alec
More information about the SeqFan
mailing list