Monday, 1 June 2026

Beatty's Theorem

This video on Beatty's Theorem by Euclidia is very interesting and very surprising. It shows that the integers can be split into two disjoint sets using an irrational number of your choice provided it is greater than 1. Each pair is unique to the irrational number being used. The two infinite sets cover the entire range of positive integers.


It's extremely easy to generate the two sequences using the following SageMath code. Here, using \( \sqrt{2} \), I've generated the first 25 terms of each sequence:

a=sqrt(2)
b=a/(a-1)
A,B=[],[]
for n in [1..25]:
    A.append(floor(n*a))
    B.append(floor(n*b))
print(A)
print(B)

[1, 2, 4, 5, 7, 8, 9, 11, 12, 14, 15, 16, 18, 19, 21, 22, 24, 25, 26, 28, 29, 31, 32, 33, 35]
[3, 6, 10, 13, 17, 20, 23, 27, 30, 34, 37, 40, 44, 47, 51, 54, 58, 61, 64, 68, 71, 75, 78, 81, 85] 

Using different values of \(a\) such as \( \pi \) or \(e\) yields different disjoint sets:

\( \pi\) yields the following sequences:

[3, 6, 9, 12, 15, 18, 21, 25, 28, 31, 34, 37, 40, 43, 47, 50, 53, 56, 59, 62, 65, 69, 72, 75, 78]
[1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 24, 26, 27, 29, 30, 32, 33, 35, 36]

\(e\) yields the following sequences:

[2, 5, 8, 10, 13, 16, 19, 21, 24, 27, 29, 32, 35, 38, 40, 43, 46, 48, 51, 54, 57, 59, 62, 65, 67]
[1, 3, 4, 6, 7, 9, 11, 12, 14, 15, 17, 18, 20, 22, 23, 25, 26, 28, 30, 31, 33, 34, 36, 37, 39]

INTERACTIVE LINK

Here a link to an interactive report that Gemini created regarding Beatty's sequences. I struggled to get this to work in Blogger but by using this external link, it all worked fine. Something to remember in the future.

No comments:

Post a Comment