MathDB
Integer function and powers of two

Source: Iberoamerican Olympiad 1990, Problem 1

May 21, 2007
functioninduction

Problem Statement

Let ff be a function defined for the non-negative integers, such that: a) f(n)=0f(n)=0 if n=2j1n=2^{j}-1 for some j0j \geq 0. b) f(n+1)=f(n)1f(n+1)=f(n)-1 otherwise. i) Show that for every n0n \geq 0 there exists k0k \geq 0 such that f(n)+n=2k1f(n)+n=2^{k}-1. ii) Find f(21990)f(2^{1990}).