f is defined such that the difference between any two consecutive integers is one.
f(1) = 1
f(2n) = f(n)
f(2n+1) = f(n)+1
where n is an integer and f is a function defined over integers...
Give a simpler explanation for f...
-
UP 0 DOWN 0 0 12
12 Answers
msp
·2009-10-16 09:28:47
Philip Calvert
·2009-10-16 09:45:54
for any k = 2n
f(k) = 1 ... f(k+1) = 2 and f(k-1)= n ..this much is clear
as for the rest [12]
msp
·2009-10-16 09:47:44
for positive integers which are of multiple of 2 then f(2k)=1 and f(2k+1)=2 (k is an integer)
for negative integers ????
Lokesh Verma
·2009-10-16 23:13:59
only for natural numbers...
Btw.. Hint: think of the binary expansion?
Lokesh Verma
·2009-10-16 23:48:42
lol.. yeah even i was thiking of some other way.. but could not :D
Philip Calvert
·2009-10-17 11:23:01
oops really ..
F(n) is the no. of ones in the binary representation of n