A Counting Parametric Problem

Algebra Level 4

Define the function f ( n ) : N N f(n) : \mathbb{N} \rightarrow \mathbb{N} as follows:

f ( n ) = { n 2 + 1 if n is odd , n 2 if n is even . f(n) = \begin{cases} n^2 + 1 & \text { if } n \text{ is odd }, \\ \frac{ n } { 2} & \text{ if } n \text { is even } . \\ \end{cases}

For how many integral n [ 1 , 100 ] n \in [1, 100] does f ( f ( . . . f ( n ) ) ) = 1 f(f(...f(n)))=1 for some number of applications of f f ?


This problem is taken from this year's MATHCOUNTS State Competition. I enjoyed solving it, so I'm sharing it with you! Enjoy solving it, and post a creative solution!


The answer is 7.

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.

2 solutions

Daniel Liu
Apr 15, 2014

Clearly, if n n is odd, n 2 + 1 n^2+1 is even. In addition n 2 + 1 2 \dfrac{n^2+1}{2} is odd because n 2 + 1 2 ( m o d 4 ) n^2+1\equiv 2\pmod{4} . Therefore, if n n is odd, then n 2 + 1 2 n \dfrac{n^2+1}{2}\le n , which gives n 1 n\le 1 .

Now, suppose we have an even integer n n . We can divide this by two repeatedly until we get an odd integer. Since we know that the only odd integer that reduces to 1 1 after f ( n ) f(n) is applied some number of times, the rest of the solutions must be a power of two. There are 6 6 even powers of two less than 100 100 , and including the 1 1 , we have a total of 7 \boxed{7} numbers.

Can you elaborate on how you got the inequality Daniel?

Jit Ganguly - 7 years, 1 month ago

Perfect! :D

Finn Hulse - 7 years, 1 month ago
Sahil Gohan
May 5, 2014

1) we will only get 1 if n = 2 or 1 finally...notice ff(1) = f(2) = 1

2)now if n = 2^any number we will finally end up with f(2) which we saw was 1

3) also we can see for any odd n except 1 the value will keep increasing..therefore we can reject all odd values of n except 1.

4) for any even value of n other than (2^any number), we will finally end up with a odd number after a few applications, which as we saw in step 3 cant end up in 1 as it keeps increasing.

5) therefore only possible values of n will be 1,2,4,8,16,32 and 64

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...