BREAKING: Target Test Prep releases Brand New 2026 On Demand GMAT prep course

Redeem

Target Test Prep · GMAT

Choose how you want to prepare

Learn live with an expert or move at your own pace. Every option includes the complete TTP study system.

★★★★★5.0559 reviews
GMATLiveTeach 7 seats left
Chris Peckover
NEXT LIVE COHORT

Oct 13 to Jan 7, 2027

with Chris Peckover

Schedule
Tue, Thu · 8:00 to 10:00 PM ET
Included
40 live hours + 6 months of GMAT OnDemand
  • Live instruction and real-time questions
  • Class recordings and assigned practice
View class & enroll
Limited cohort · enrollment openTarget Test Prep
EALiveTeach 5 seats left
Logan Thompson
EXECUTIVE ASSESSMENT

Sep 6 to Dec 6, 2026

with Logan Thompson

Schedule
Sun · 9:30 AM to 12:30 PM ET
Included
Live EA class + 6 months of EA OnDemand
  • Expert-led weekly online sessions
  • EA Masterclass access between classes
View EA class & enroll
Limited cohort · enrollment openTarget Test Prep
GMATOnDemand Start anytime
SELF-PACED MASTERCLASS

Target Test Prep GMAT OnDemand

Complete access from day one. Study on your schedule.

130-point score guarantee
$0to start then $127/mo
  • Personalized study plan and analytics
  • Thousands of lessons and practice questions

Compare the format, schedule, and included access before enrolling. Prices and seat counts shown reflect the supplied offer details.

How many integers between 1 and 10^21 are such that the sum of their digits is 2?

Expert replies
Source: — Problem Solving |

BTGmoderatorDC wrote:
Sun Jan 26, 2020 2:15 am
How many integers between 1 and 10^21 are such that the sum of their digits is 2?

A. 190
B. 210
C. 211
D. 230
E. 231



OA E

Source: Magoosh
If the sum of the digits of an integer is 2, then either a digit is 2 and the rest of the digits are 0 OR two digits are 1 and the rest of the digits are 0.

Case 1: One digit is 2 and the rest of the digits are 0.

Since the first digit of an integer can’t be 0, 2 must be the first digit. So between 1 and 10^21, we have: 2, 20, 200, 2000, etc. Since 2 = 2 x 10^0, 20 = 2 x 10^1, 200 = 2 x 10^2, …, and the last one being 2 x 10^20, we have 21 such numbers.

Case 2: Two digits are 1 and the rest of the digits are 0.

Notice that 10^21 is 1 followed by 21 zeros, i.e., a 22-digit number. However, it’s the smallest 22-digit number. Therefore, any number we have can only have at most 21 digits. Also, though we’ve mentioned that the first digit of an integer can’t be 0, let’s for the moment assume that it can be. Now assume that we have a 21-digit number (or code) that consists of 2 ones and 19 zeros. The number of ways to arrange 2 ones and 19 zeros is 21!/(2! x 19!) = (21 x 20 x 19!)/(2 x 19!) = 210. So there are 210 such codes and all these 210 codes are actually the numbers from 1 to 10^21 that have two digits of 1 and the rest of the digits as 0 if we omit all the initial 0s before the first digit of 1 (for example, consider 000000000000000000101 as the number 101).

Therefore, in the two cases combined, we have a total of 21 + 210 = 231 such numbers.

Answer: E

Scott Woodbury-Stewart
Founder and CEO
[email protected]

Image

See why Target Test Prep is rated 5 out of 5 stars on BEAT the GMAT. Read our reviews

ImageImage
Join the discussion