When counting integers in binary, if you put a (binary) point to the right of the count then the column immediately to the left denotes a digit with a multiplier of ; the digit in the next column to the left has a multiplier of ; and so on. So in the following table:
0. 1. 10. 11. ...the binary number "
10" is .
You can also have binary digits to the right of the “point”, just as in the decimal number system. In that case, the digit in the place immediately to the right of the point has a weight of , or .
The weight for the second column to the right of the point is or . And so on.
If you take the integer binary count of the first table, and ''reflect'' the digits about the binary point, you end up with '''the van der Corput sequence of numbers in base 2'''.
.0 .1 .01 .11 ...The third member of the sequence, binary
0.01, is therefore or .
11 in decimal is ..1101 or
;Task description:
* Create a function/method/routine that given ''n'', generates the ''n'''th term of the van der Corput sequence in base 2.
* Use the function to compute ''and display'' the first ten members of the sequence. (The first member of the sequence is for ''n''=0).
* As a stretch goal/extra credit, compute and show members of the sequence for bases other than 2.
;See also:
* [http://www.puc-rio.br/marco.ind/quasi_mc.html#low_discrep The Basic Low Discrepancy Sequences]
* [[Non-decimal radices/Convert]]
* [[wp:Van der Corput sequence|Van der Corput sequence]]