The amazing integer sequence http://oeis.org/A002487 a(0,1,2,3,...) = 0, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, 1, 5, 4, 7, 3, 8... which generates the nonnegative rationals 0/1, 1/1, 1/2, 2/1, 1/3, 3/2,... in Calkin-Wilf order via the recurrence a(n+2) = 2*a(n+1)*Floor(a(n)/a(n+1)) + a(n+1) - a(n) -- that sequence of rationals can be viewed as a pseudo-random number generator for the probability distribution ProbDensity(x) = 1/2 if 0<x<1, but = 1/(2*x*x) if x>1 here: http://mathworld.wolfram.com/UniformRatioDistribution.html But unlike the usual pseudo-random generators with finite period, this has infinite period. If only the rationals lying in (0,1) are taken, which is every other rational starting at 1/2 (i.e. discard the rationals>1), then we get a uniform01 pseudorandom number generator which only generates rationals, generates them all, and has "infinite period." You could combine it with finite-period pseudo-random generators to get a more-random infinite-period uniform01 generator. -- Warren D. Smith http://RangeVoting.org <-- add your endorsement (by clicking "endorse" as 1st step)