Find the 2017 smallest positive integer that gains an extra digit when doubled.

117 Views Asked by At

I know the first term is 5 It's continues till 9 And then there's a break in the series and then resumes at 50 and till 90. But can I get a more formal way?

1

There are 1 best solutions below

6
On

How many numbers with exactly $n$ digits that satisfy the property are there?

$$(10^n-1)-(10^n/2-1)=10^n/2$$

How many numbers with at most $n$ digits that satisfy the property are there?

$$f(n)=\sum_{k=1}^n\frac{10^n}2=\frac{10^{n+1}-10}{18}=\frac59\cdot \underbrace{99\ldots9}_{n\text{ nines}}=\underbrace{55\ldots5}_{n\text{ fives}}$$

Since $f(3)=555$ and $f(4)=5555$, the last of those $2017$ numbers has four digits, so it is $$4999+2017-555=6461$$