← RoseCode

ROSECODE 389

Beatty sequences

Philippe_57721 · Programming ·

There is a beautiful theorem by Samuel Beatty which states:

If α and β are positive irrational numbers such as 1α+1β=1
then A={nN,n×α} and B={nN,n×β} are a partition of N:
N=AB and AB=

Let's A the vector contained in this file data389.txt

If A is a Beatty sequence, can you find the corresponding value α

Answer format: α // truncated at 6 positions after the decimal point.

[My timing: instant]