In reply to:


That's good, but not what I'm looking for. There is a relatively simple pencil and paper way to do it. I can remember a tiny bit of it... like if I had a 4-digit repeating sequence (like .12341234...) I would start out doing something like writing down 1234/1000 and moving the decimal... oh, hell, I can't remember, just that it was a really neat and totally non-intuitive process.




The approximation 2434/2659 can be obtained by using the theory of Continued Fractions. These are formulas of the form

a0+1/(a1+1/(a2+1/(a3+...)))

The basic idea is to note that

0.9153818 = 0+1/(1+1/(10+1/(1+1/(4+1/(2+1/(20+1/(1+1/(1+1/(3+1/(2+1/(3+1/(1+1/25))))))))))))

How did I get that horrible formula?

1/.9153818 = 1.092440335
1/.092440335 = 10.81778861
1/.81778861 = 1.222809893
1/.222809893 = 4.488131064
1/.488131064 = 2.048630119
etc., etc.

Note that in each case I take the integer part of the result and plug it into the next slot of the continued fraction, then take the reciprocal of the fractional part and repeat.

It stands to reason, and in fact can be proven, that taking the first several terms of the continued fraction provides a very good approximation to the number you started with. In this instance

2434/2659 = 0+1/(1+1/(10+1/(1+1/(4+1/(2+1/20)))))

This doesn't prove that those are the integers that they are using in the unlock code algorithm, but it does give you a way of generating possible numbers from the ratio you observed.

And I'll agree with everyone else who said that it's a stupid way of generating an unlock code.

--John