On November 20, 2007, the Putnam problem of the day was:
The set of all positive integers is the union of two disjoint subsets ,
, where
, and
, and
for
. Determine
.
Back in November 2007 I could not solve the problem. Now, almost four years later, I will give it another try.
__________
My “solution”:
Let be the set of natural numbers (positive integers). We define
and
. Note that we must have
and
.
Let . Then, we obtain
.
Next, let and
. Then,
.
Let . Then, we obtain
.
Next, let and
. Then,
.
Next, let and
. Then,
.
Let . Then, we obtain
.
Next, let and
. Then,
.
Let . Then, we obtain
.
Next, let and
. Then,
.
Let us stop iterating here. So far, we have
.
Consulting the On-Line Encyclopedia of Integer Sequences (OEIS), we find out that and
are the lower Wythoff (A000201) and upper Wythoff (A001950) sequences, respectively. These two are Beatty sequences generated by the golden ratio
, as follows
,
where is the floor function. Recall that
, which allows us to write
.
The following Python script produces the first twenty terms of the lower and upper Wythoff sequences:
from math import floor
from math import sqrt
# golden ratio
phi = (1 + sqrt(5)) / 2.0
# define function f
def f (n):
return int(floor(phi * n))
# define function g
def g (n):
return int(floor((phi+1) * n))
print "Lower and upper Wythoff sequences:\n"
for n in range(1,21):
print "f(%d) = %d \t g(%d) = %d" % (n, f(n), n, g(n))
This script produces the output:
Lower and upper Wythoff sequences: f(1) = 1 g(1) = 2 f(2) = 3 g(2) = 5 f(3) = 4 g(3) = 7 f(4) = 6 g(4) = 10 f(5) = 8 g(5) = 13 f(6) = 9 g(6) = 15 f(7) = 11 g(7) = 18 f(8) = 12 g(8) = 20 f(9) = 14 g(9) = 23 f(10) = 16 g(10) = 26 f(11) = 17 g(11) = 28 f(12) = 19 g(12) = 31 f(13) = 21 g(13) = 34 f(14) = 22 g(14) = 36 f(15) = 24 g(15) = 39 f(16) = 25 g(16) = 41 f(17) = 27 g(17) = 44 f(18) = 29 g(18) = 47 f(19) = 30 g(19) = 49 f(20) = 32 g(20) = 52
Finally, we have .
__________
I am not happy with this “solution”. I obviously cheated when I consulted the OEIS. Supposing one is not acquainted with Beatty sequences, is there any hope of solving the problem? If one happens to be acquainted with Beatty sequences and postulates that
,
where , how does one arrive at the conclusion that
and
? In other words, what would a proper solution look like?
Tags: Beatty Sequences, Golden Ratio, Integer Sequences, Putnam problem of the day, Python, Wythoff Sequences
August 21, 2011 at 22:47 |
If you happen to be familiar with Beatty sequences, the part about partitioning the integers into two monotonic sequences should be a tip-off that they might be involved (or, if not, that you should do something with the Lambek–Moser theorem, but first try Beatty because it’s simpler).
And once you guess that the answer comes from Beatty sequences, i.e. that f(n) = floor(rx) and g(n) = floor(sx) for 1/r+1/s=1, then the functional equation g(n)=f(f(n))+1 translates into the equation s=r^2 — the floor and +1 parts of the functional equation are irrelevant for large n. Now all you have to do is solve the two simultaneous equations s=r^2 and 1/r+1/t=1, and check that the simplifying assumptions you made are valid i.e. that the Beatty sequences you get from this solution actually solve the original problem.