← RoseCode

ROSECODE 209

Enumerate the rationals

Philippe_57721 · Programming ·

Consider the function F(X) = 1 / ( 2 * [X] - X + 1 ) where [X] is the integer part of X.

It is quite remarkable that the sequence {0, F(0), F(F(0), F(F(F(0))), ... } contains every non-negative rational exactly once.
{0, F(0), F(F(0), F(F(F(0))), ... } = Q+

We note F(0)^n = F(F(...(F(0)) // Function F is applied n times.

What is F(0)^1413121110987654321
Find n such as F(0)^n = 1415926535/5772156649

Answer format: N/D,Index

[My timing: < 100 ms]