11 Nov
2011
11 Nov
'11
10:57 p.m.
This reminded me of a slightly related puzzle: Figure out the value of a Legendre symbol, using the continued fraction of the 'numerator' & 'denominator'. There must be some relationship, since the iteration for CF and Legendre symbol are so similar. Rich ----- Quoting Bill Gosper <billgosper@gmail.com>: <massively clipped>
Both this and Neil's (good one) are equivalent to the formula alf(x) = waiting time from 1= -1 + 2^L1 (1 + 2^L2 (-1 + ... (-1 + 2^Ln)))), n odd,
-1 + 2^L1 (1 + 2^L2 (-1 + ... (1 + 2^(-1 + Ln)))), n even,
where CF(x) = {L1,...Ln}.