For positive integers n,
f(1)=1
f(3)=3
f(2n)=f(n)
f(4n+1)=2f(2n+1)-f(n)
f(4n+3)=3f(2n+1)-2f(n)
How many possible values of n (which is less than or equal to 1988) are there so that f(n)=n?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
We have an easy way to find f(n). First you convert n to binary form, and reverse it, then change it back to decimal form, and thats f(n).
As example, lets say we want to find f(23).
1)convert 23 to binary form.
2 3 1 0 = 1 0 1 1 1 2
2)reverse 10111 so it become 11101.
3)change 11101 to decimal form.
1 1 1 0 1 2 = 2 9 1 0
So f(23)=29.