re a question from Maple users

N. J. A. Sloane njas at research.att.com
Mon May 15 06:03:34 CEST 2006


Emeric,  say you want all 16 binary vectors of length 4

This will get them all, but with an extra 1 at the end which you
will have to ignore - or delete with an editor:

> for i from 0 to 2^4-1 do lprint(convert(2^4+i,base,2)); od:
[0, 0, 0, 0, 1]
[1, 0, 0, 0, 1]
[0, 1, 0, 0, 1]
[1, 1, 0, 0, 1]
[0, 0, 1, 0, 1]
[1, 0, 1, 0, 1]
[0, 1, 1, 0, 1]
[1, 1, 1, 0, 1]
[0, 0, 0, 1, 1]
[1, 0, 0, 1, 1]
[0, 1, 0, 1, 1]
[1, 1, 0, 1, 1]
[0, 0, 1, 1, 1]
[1, 0, 1, 1, 1]
[0, 1, 1, 1, 1]
[1, 1, 1, 1, 1]
>

Neil





More information about the SeqFan mailing list