👩💻 Join our community of thousands of amazing developers!
Here’s a surprising theorem [1]. (Beatty’s theorem) Let a and b be any pair of irrational numbers greater than 1 with 1/a + 1/b = 1. Then the sequences { ⌊na⌋ } and { ⌊nb⌋ } contain every positive integer without repetition. Illustration Here’s a little Python code to play with this theorem.We set a […] The post Beatty’s theorem first appeared on John D. Cook....