Any idea about Images of a Function?

Algebra Level 5

Let f f be a function from the set of all non-negative integers into itself such that:

  • ( f ( 2 n + 1 ) ) 2 ( f ( 2 n ) ) 2 = 6 f ( n ) + 1 (f(2n+1))^2 - (f(2n))^2 = 6f(n) + 1 , and

  • f ( 2 n ) f ( n ) f(2n) \geq f(n)

How many numbers less than 2015 2015 are there in the image of f f ?


The answer is 128.

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

Patrick Corn
Aug 17, 2015

The first step is to show that f ( 2 n + 1 ) = 3 f ( n ) + 1 f(2n+1) = 3f(n)+1 and f ( 2 n ) = 3 f ( n ) f(2n) = 3f(n) . Certainly any function of this form obeys the conditions.

We get f ( 1 ) 2 = f ( 0 ) 2 + 6 f ( 0 ) + 1 = ( f ( 0 ) + 3 ) 2 8 f(1)^2 = f(0)^2+6f(0)+1 = (f(0)+3)^2-8 , and the only positive integer solution to x 2 y 2 = 8 x^2-y^2 = 8 is x = 3 , y = 1 x=3, y=1 (factor), so f ( 0 ) = 0 f(0) = 0 and f ( 1 ) = 1 f(1) = 1 .

Now note that ( f ( 2 n + 1 ) f ( 2 n ) ) ( f ( 2 n + 1 ) + f ( 2 n ) ) = 6 f ( n ) + 1 (f(2n+1)-f(2n))(f(2n+1)+f(2n)) = 6f(n)+1 and the two factors differ by at least 2 f ( 2 n ) 2 f ( n ) 2f(2n) \ge 2f(n) . So the second factor is at least 2 f ( n ) + 1 2f(n)+1 , and so the first factor is at most 6 f ( n ) + 1 2 f ( n ) + 1 < 3 \frac{6f(n)+1}{2f(n)+1} < 3 .

But the first factor can't be 2 2 , so it must be 1 1 , and the second factor is 6 f ( n ) + 1 6f(n)+1 . So we get f ( 2 n + 1 ) = 3 f ( n ) + 1 f(2n+1) = 3f(n)+1 and f ( 2 n ) = 3 f ( n ) f(2n) = 3f(n) . Note that together with the values of f ( 0 ) f(0) and f ( 1 ) f(1) , this uniquely determines f f .

One way to describe f ( n ) f(n) is that it equals the binary expansion of n n translated into ternary. So e.g. f ( 5 ) = 10 f(5) = 10 because 5 5 is 101 101 in binary, and 101 101 in ternary is 10 10 . It's pretty clear that this function satisfies the conditions in the first step, so it equals f f .

So the answer is the number of numbers less than 2015 whose ternary expansion is all 1 1 s and 0 0 s. This is just every number with such a ternary expansion that has up to 7 7 digits. So there are 2 7 = 128 2^7 = \fbox{128} such numbers.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...