Reverse it!

Number Theory Level pending

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?


The answer is 92.

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.

1 solution

Lee Young Kyu
Jul 22, 2014

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 10 = 1011 1 2 23_{10}=10111_{2}

2)reverse 10111 so it become 11101.

3)change 11101 to decimal form.

1110 1 2 = 2 9 10 11101_{2}=29_{10}

So f(23)=29.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...