SOLUTION: The pattern forming the irrational number 0.120210012000210000120000021... continues indefinitely. What is the 589th digit in this pattern?

Algebra ->  Decimal-numbers -> SOLUTION: The pattern forming the irrational number 0.120210012000210000120000021... continues indefinitely. What is the 589th digit in this pattern?      Log On


   



Question 1197918: The pattern forming the irrational number 0.120210012000210000120000021... continues indefinitely. What is the 589th digit in this pattern?
Found 2 solutions by math_tutor2020, ikleyn:
Answer by math_tutor2020(3817) About Me  (Show Source):
You can put this solution on YOUR website!

Given number: 0.120210012000210000120000021...

Break up the decimal digits like so
120
2100
12000
210000
1200000
21...

A line break happens whenever we reach a nonzero digit
The nonzero digits are 1,2
The order of 1,2 swaps positions each time we get to a new row.
Also, the number of zeros increases.
The number of zeros in a given row is exactly equal to the row number.
RowTermNumber of DigitsPartial Sum
112033
2210043+4 = 7
31200057+5 = 12
4210000612+6 = 18
51200000718+7 = 25
621...825+8 = 33


The partial sums show us that we're adding consecutive integers
3+4 = 7
7+5 = 12 aka 3+4+5 = 12
12+6 = 18 aka 3+4+5+6 = 18
18+7 = 25 aka 3+4+5+6+7 = 25
and so on.

The partial sums give us a count how many decimal digits there are from row 1 to row n.

Recall that summing the integers from 1 to n is found through this formula n(n+1)/2
For example, if we wanted to sum from 1 to n = 5
1+2+3+4+5 = 15
n(n+1)/2 = 5*(5+1)/2 = 15
Or if we wanted to sum from 1 to n = 55
n(n+1)/2 = 55*(55+1)/2 = 1540

But we'll subtract off 1+2 = 3 since we're not starting at 1, but instead starting at 3.
The formula tailored to this problem is n(n+1)/2-3 which computes the sum 3+4+5+...+(n-1)+n.

If you were to solve n(n+1)/2-3 = 589, you'll get n = -34.91 and n = 33.91 approximately
This tells us there is no way to sum from 3 to n to get 589 exactly
Here are the two closest values.
n(n+1)/2-3 = 33(33+1)/2-3 = 558
n(n+1)/2-3 = 34(34+1)/2-3 = 592

Since 3+4+5+...+32+33 = 558, this means the first 33 rows consist of 558 digits (vast majority are 0's; rare sightings of 1's and 2's as well)
When going from slot 558 to slot 589, we move to the right 589-558 = 31 spaces.
The first two spaces are "12" or "21", the order doesn't really matter since we're skipping over these slots anyway.
The next 31-2 = 29 slots are zeros.

This means that the 589th digit is a zero.
This isn't much of a surprise considering zero is the most repeated value. Especially as you move further down the rows.


Answer: 0

Edit: The tutor @ikleyn has a good point. I somehow made a mistake with the indexing.
Replace every n in n(n+1)/2-3 with n+2 to get (n+2)(n+3)/2-3 and that formula is equivalent to n(n+1)/2+2n that @ikleyn has written.
The shift from n to n+2 will correct the indexing error. My apologies for the mix up.

Answer by ikleyn(52803) About Me  (Show Source):
You can put this solution on YOUR website!
.
The pattern forming the irrational number 0.120210012000210000120000021... continues indefinitely.
What is the 589th digit in this pattern?
~~~~~~~~~~~~~~~~


        Tutor @math_tutor2020 has great idea about separating the infinite sequence of digits
        into the sequence of partial strings. But his formula for calculating the total length
        of the union of these strings is not precisely correct.

        So I came to make the necessary corrections. The final conclusion/answer of my analysis
        is the same as tutor @math_tutor2020 has: the 589-th digit of the pattern is 0 (zero).


I will interpret your question as if it asks about the 589-th digit after the decimal point.


Our partial strings are 

    S(1) = 120

    S(2) = 2100

    S(3) = 12000

    S(4) = 210000

    S(5) = 1200000

and so on . . . 


We want to get a formula for the length of the union/concatenation  { S(1) U S(2) U S(3) U S(4) U S(5) U . . . U S(n) }.


It is the sum of an arithmetic progression, which can be written formally.

But it can be written in a less formal way from the following considerations: 
each S(k), k = 1, 2, 3, . . .  contains two symbols "1" and "2" in different order 
(which does not matter for us now) and contains k zeroes.  So, the length of the union is

    length { S(1) U S(2) U S(3) U S(4) U S(5) U . . . U S(n) } = (1+2+3+4+5+ . . . +n) + 2n = %28n%2A%28n%2B1%29%29%2F2 + 2n.


             ( * * * it is the place, where I make my correction * * * ).


Now I will use this formula to calculate the length of the union  {U S(n)}  for some values of n that provide 
the length of the union  {U S(n)}  in vicinity of 589.


     n     {U S(n)}

    30       525

    31       558

    32       592

    33       627


From the table, you can see, that the 589-th digit is the digit 3 (three) positions to the left from 
the ending digit of S(32).  Since S(32) has 32-2 = 30 ending zeroes, you conclude that the 589-th digit
of the given pattern after the decimal point is 0 (zero).

Solved.