f(n) and g(n) are defined as follows:

This topic has expert replies
User avatar
Elite Legendary Member
Posts: 3991
Joined: Fri Jul 24, 2015 2:28 am
Location: Las Vegas, USA
Thanked: 19 times
Followed by:37 members

Timer

00:00

Your Answer

A

B

C

D

E

Global Stats

[GMAT math practice question]

f(n) and g(n) are defined as follows:
f(n) = {0 if n is even 1 if n is odd and g(n) = {0 if n is a multiple of 5 1 if n is not a multiple of 5

If h(n) is defined as (1 + f(n))(1 - g(n)), what is h(1) + h(2) + …. + h(1900)?

A. 550
B. 560
C. 570
D. 580
E. 590

User avatar
Elite Legendary Member
Posts: 3991
Joined: Fri Jul 24, 2015 2:28 am
Location: Las Vegas, USA
Thanked: 19 times
Followed by:37 members
=>

If n is not a multiple of 5, then h(n) = (1 + f(n))(1 - g(n)) = (1 + f(n))(1 - 1) = 0.
If n is a multiple of 5, then h(n) = (1 + f(n))(1 - g(n)) = (1 + f(n))(1 - 0) = (1 + f(n)).
Thus, if n is a multiple of 10, we have h(n) = (1 + f(n)) = (1 + 0) = 1 since n is an even number and f(n) = 0.
If n has a remainder 5 when n is divided by 10, we have h(n) = (1 + f(n)) = 1 + 1 = 2 since n is an odd number.

Then we have h(10) = h(20) = … = h(1900) = 1 and h(5) = h(15) = … = h(1895) = 2.

The number of multiples of 10 is (1900 – 10)/10 + 1 = 1890/10 + 1 = 189 + 1 = 190.
The number of multiples that have a remainder 5 when they are divided by 10 is (1895 – 5)/10 + 1 = 1890/10 + 1 = 189 + 1 = 190.

Thus, we have
h(5) + h(10) + h(15) + h(20) + … + h(1895) + h(1990)
= h(5) + h(15) + … + h(1895) + h(10) + h(20) + … + h(1990)
= 2·190 + 190 = 570.

Therefore, C is the correct answer.
Answer: C