- Get link
- X
- Other Apps
Hofstadter mentions the following recursive relation in his great book "Gödel, Escher, Bach": g(0)=0;g(n)=n−g(g(n−1)). I claim that g(n)=⌊ϕ⋅(n+1)⌋, where ϕ=−1+√52, and I'll show this using a technique that makes proving many identities of this type nearly automatic.
Let ϕ⋅n=⌊ϕ⋅n⌋+e, where 0<e<1 as ϕ is irrational, nor can e=1−ϕ, and note that ϕ satisfies ϕ2+ϕ−1=0. Some algebra gives n−⌊(⌊ϕ⋅n⌋+1)⋅ϕ⌋=n−⌊(n⋅ϕ−e+1)⋅ϕ⌋=n−⌊n⋅ϕ2−e⋅ϕ+ϕ⌋=n−⌊n⋅(1−ϕ)−e⋅ϕ+ϕ⌋=n−n−⌊−n⋅ϕ−e⋅ϕ+ϕ⌋=−⌊−n⋅ϕ−e⋅ϕ+ϕ⌋=−⌊−n⋅ϕ+e−e−e⋅ϕ+ϕ⌋=⌊ϕ⋅n⌋−⌊−e−e⋅ϕ+ϕ⌋.
Now if 0<e<1−ϕ⟹0<−e−e⋅ϕ+ϕ<ϕ;1−ϕ<e<1⟹−1<−e−e⋅ϕ+ϕ<0.
This implies n−⌊(⌊ϕ⋅n⌋+1)⋅ϕ⌋=⌊ϕ⋅(n+1)⌋. Since ⌊ϕ⋅(0+1)⌋=0, we're done.
The point of the algebra was to move all terms involving n out, and then checking to see how the remaining term varied with e. A simple idea, but very useful.
Let ϕ⋅n=⌊ϕ⋅n⌋+e, where 0<e<1 as ϕ is irrational, nor can e=1−ϕ, and note that ϕ satisfies ϕ2+ϕ−1=0. Some algebra gives n−⌊(⌊ϕ⋅n⌋+1)⋅ϕ⌋=n−⌊(n⋅ϕ−e+1)⋅ϕ⌋=n−⌊n⋅ϕ2−e⋅ϕ+ϕ⌋=n−⌊n⋅(1−ϕ)−e⋅ϕ+ϕ⌋=n−n−⌊−n⋅ϕ−e⋅ϕ+ϕ⌋=−⌊−n⋅ϕ−e⋅ϕ+ϕ⌋=−⌊−n⋅ϕ+e−e−e⋅ϕ+ϕ⌋=⌊ϕ⋅n⌋−⌊−e−e⋅ϕ+ϕ⌋.
Now if 0<e<1−ϕ⟹0<−e−e⋅ϕ+ϕ<ϕ;1−ϕ<e<1⟹−1<−e−e⋅ϕ+ϕ<0.
This implies n−⌊(⌊ϕ⋅n⌋+1)⋅ϕ⌋=⌊ϕ⋅(n+1)⌋. Since ⌊ϕ⋅(0+1)⌋=0, we're done.
The point of the algebra was to move all terms involving n out, and then checking to see how the remaining term varied with e. A simple idea, but very useful.
it's look good,post
ReplyDelete