other programs %o, was Re: Extending silly sequences

N. J. A. Sloane njas at research.att.com
Fri May 12 23:35:47 CEST 2006


Jaap, an attached text file is OK, certainly

or we can do what we have been doing with Python:  Example:

%o A048927 (Python: replace leading dots by blanks):
%o A048927 def ways (n, left=5, last=1):
%o A048927 . a=last; a3=a*a*a; c=0
%o A048927 . while a3<=n-left+1:
%o A048927 ... if left>1:
%o A048927 ..... c=c+ways(n-a3, left-1, a)
%o A048927 .... elif a3==n:
%o A048927 ..... c=c+1
etc

Neil





More information about the SeqFan mailing list