On Thu, Dec 5, 2013 at 9:50 PM, Nils Bruin <nbr...@sfu.ca> wrote: > It will be very hard to beat the simple closed formula > > ( (i>>1) ^^ i for i in xrange(2^n) ) >
Yes indeed -- with a formula like that, there's little reason not to implement it ad-hoc every time. Unless a user wants it, and doesn't know this bit of information. Though... what Nathannnnnn said was that he wants to know which bit changes... (i.valuation(2) for i in srange(1,2^n)) does the job -- though this can certainly be implemented better. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/groups/opt_out.